示例#1
0
 /// <summary>
 /// Initializes a <see cref="Parser"/> with tokens and an error state.
 /// </summary>
 /// <param name="tokens">Tokens to parse.</param>
 /// <param name="errorState">Error state object to record detected errors.</param>
 public Parser(IEnumerable <Token> tokens, ErrorState errorState)
 {
     _tokens    = tokens.ToList();
     ErrorState = errorState;
 }
示例#2
0
 public Resolver(Interpreter interpreter, ErrorState errorState)
 {
     _interpreter = interpreter;
     ErrorState   = errorState;
 }
示例#3
0
 /// <summary>
 /// Initializes a <see cref="Lexer"/> with source code and an <see cref="ErrorState"/> object.
 /// </summary>
 /// <param name="source">Source code of the program.</param>
 /// <param name="errorState">Error state object to record detected errors.</param>
 public Lexer(string source, ErrorState errorState)
 {
     _source    = source;
     ErrorState = errorState;
 }