public static Lexer Create(StreamReader reader, ErrorList errors) { Lexer lex = new Lexer(reader, errors); lex.MoveNext(); return lex; }
private Lexer(StreamReader reader, ErrorList errors) { _errors = errors; _reader = reader; CurrentToken = Token.Eol; }
protected CompilerContext(string filePath, StreamReader inputReader, Importer importer, IEmitter emitter, CompilationFlags flags) { FilePath = filePath; Flags = flags; Emitter = emitter; CompileErrors = new ErrorList(); Importer = importer; SymbolTable = new SymbolTable(); Lexer = Lexer.Create(inputReader, CompileErrors); }