Ejemplo n.º 1
0
        public CodeGenScope GenerateCode(AstParserState p, int val)
        {
            CodeGenScope scope = NewScope(null, p);

            AddScopeIrep(scope, new IRep());



            Gen(scope, p.tree, NOVAL);
            return(scope);
        }
Ejemplo n.º 2
0
        public CodeGenScope NewScope(CodeGenScope parent, AstParserState parser)
        {
            CodeGenScope scope = new CodeGenScope();

            scope.vm     = state;
            scope.parser = parser;

            if (parent == null)
            {
                return(scope);
            }

            scope.prev = parent;

            AddScopeIrep(scope, new IRep());

//			scope.sp =

            scope.rlev = parent.rlev + 1;

            return(scope);
        }