public Block CompileBlock() { this.block = new Block(this.source, this.outer); this.CompileBlockArguments(); this.CompileLocals(); // TODO review why to use this.locals instead of this.block.CompileLocal directly foreach (string argname in this.arguments) this.block.CompileArgument(argname); foreach (string locname in this.locals) this.block.CompileLocal(locname); this.CompileBody(); return this.block; }
protected override object Evaluate(string text, Machine machine) { Parser parser = new Parser(text); Block block = parser.CompileBlock(); Process process = new Process(block, null, machine); return process.Execute(); }