Give the lexer a session so that it can fail more informatively
This commit is contained in:
parent
531515d7ae
commit
a459bcd127
4 changed files with 34 additions and 22 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue