/// <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; }
public Resolver(Interpreter interpreter, ErrorState errorState) { _interpreter = interpreter; ErrorState = errorState; }
/// <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; }