예제 #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
파일: Lexer.cs 프로젝트: collenirwin/Loxish
 /// <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;
 }