public Block CompileBlock(string text) { ModelParser parser = new ModelParser(text); var expr = parser.ParseBlock(); Block block = new Block(text); BytecodeCompiler compiler = new BytecodeCompiler(block); compiler.CompileExpression(expr); return block; }
public void CompileExpressions() { IList<ExpressionResult> results = ExpressionResult.LoadExpressionResults("Expressions.txt"); foreach (var result in results) { ModelParser parser = new ModelParser(result.Text); Block block = new Block(); BytecodeCompiler compiler = new BytecodeCompiler(block); compiler.CompileExpression(parser.ParseExpression()); result.ValidateBlock(block); } }