Give the lexer a session so that it can fail more informatively

This commit is contained in:
Brian Anderson 2011-05-11 23:04:16 -04:00
parent 531515d7ae
commit a459bcd127
4 changed files with 34 additions and 22 deletions

View file

@ -142,7 +142,7 @@ fn new_parser(session.session sess,
auto srdr = IO.file_reader(path);
auto filemap = codemap.new_filemap(path, pos);
Vec.push[codemap.filemap](sess.get_codemap().files, filemap);
auto rdr = lexer.new_reader(srdr, path, filemap);
auto rdr = lexer.new_reader(sess, srdr, path, filemap);
// Make sure npos points at first actual token.
lexer.consume_any_whitespace(rdr);
auto npos = rdr.get_chpos();