public object Compile(CompilerEnvirons compilerEnv, ScriptNode tree, string encodedSource, bool returnFunction) { CodeGenerator cgen = new CodeGenerator(); itsData = cgen.Compile(compilerEnv, tree, encodedSource, returnFunction); return itsData; }
private void GenerateNestedFunctions() { int functionCount = scriptOrFn.GetFunctionCount(); if (functionCount == 0) { return; } InterpreterData[] array = new InterpreterData[functionCount]; for (int i = 0; i != functionCount; i++) { FunctionNode fn = scriptOrFn.GetFunctionNode(i); CodeGenerator gen = new CodeGenerator(); gen.compilerEnv = compilerEnv; gen.scriptOrFn = fn; gen.itsData = new InterpreterData(itsData); gen.GenerateFunctionICode(); array[i] = gen.itsData; } itsData.itsNestedFunctions = array; }