Compile() public static méthode

public static Compile ( SymbolTable symTable, object exp ) : IASTNode
symTable SymbolTable
exp object
Résultat IASTNode
Exemple #1
0
        public object Interpret(object exp)
        {
            IASTNode node = ASTCompiler.Compile(null, ListProcess.TransformLibraryForms(exp));

            Env.ReserveGlobalVariables(SymbolTable.GetGlobalSymbolCount());

            return(new ASTNodeVisitor_Interpreter(null, node).Value);
        }
Exemple #2
0
        public object Interpret(object exp)
        {
            IASTNode node = ASTCompiler.Compile(null, ListProcess.TransformLibraryForms(exp));

            GlobalEnv.Instance().ReserveVariables(SymbolTable.GetGlobalSymbolCount());

            var lambda = new ASTNode_Lambda {
                bodyNode = node, localVarCount = 0, freeAddresses = new List <FreeAddress>(),
            };

            return(mStack.CallScriptProcedure(new ScriptProcedure(null, CompileToByteCode(lambda)), new List <object> {
            }));
        }