Example #1
0
 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();
 }
Example #2
0
 public Parser(Input input)
 {
     this.input = input;
     lexer = new Lexer(input);
 }
Example #3
0
 internal LuaSyntaxException(Input input, string message, Exception inner = null)
     : this(input.File, input.Line, input.Column, message, inner)
 {
 }
Example #4
0
 internal LuaSyntaxException(Input input, Exception inner, string format, params object[] args)
     : this(input, String.Format(format, args), inner)
 {
 }
Example #5
0
 public Lexer(Input input)
 {
     this.input = input;
     Current = NextToken();
     Next = NextToken();
 }