Func<object> CompileString(string source) { var input = new Input(source); var parser = new Parser(input); var ast = parser.Parse(); var gen = new Generator(Context); var expr = gen.Compile(ast); return expr.Compile(); }
public Parser(Input input) { this.input = input; lexer = new Lexer(input); }
internal LuaSyntaxException(Input input, string message, Exception inner = null) : this(input.File, input.Line, input.Column, message, inner) { }
internal LuaSyntaxException(Input input, Exception inner, string format, params object[] args) : this(input, String.Format(format, args), inner) { }
public Lexer(Input input) { this.input = input; Current = NextToken(); Next = NextToken(); }