Пример #1
0
        public static Lexer Create(StreamReader reader, ErrorList errors)
        {
            Lexer lex = new Lexer(reader, errors);
            lex.MoveNext();

            return lex;
        }
Пример #2
0
        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);
 }