public CodeGenScope GenerateCode(AstParserState p, int val) { CodeGenScope scope = NewScope(null, p); AddScopeIrep(scope, new IRep()); Gen(scope, p.tree, NOVAL); return(scope); }
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); }