예제 #1
0
        //utility functions for working with literals
        private int GetLiteralValue(AtlasParser.LiteralContext literal)
        {
            int val = 0;

            var bytes = BigInteger.Parse(literal.INT().GetText()).ToByteArray();

            val = AtlasCPU.IntFromBytes(bytes.ElementAtOrDefault(3), bytes.ElementAtOrDefault(2), bytes.ElementAtOrDefault(1), bytes.ElementAtOrDefault(0));

            return(val);
        }
예제 #2
0
 private void EmitLiteral(AtlasParser.LiteralContext literal)
 {
     EmitWord(GetLiteralValue(literal));
 }