Example #1
0
        public override void OutAIntConstExp(AIntConstExp node)
        {
            // check: valid 32 bit integer
            // annotate: type and value in current scope.
            long  result = RuntimeEnvironment.ConvertToLong(node.GetValue());
            PType type   = RuntimeEnvironment.GetSmallestFit(result);

            Env.CurrentScope.Add(node, result, type);
            base.OutAIntConstExp(node);
        }