1
Fork 0

Give the StringReader a sess: &ParseSess.

This commit is contained in:
Jeffrey Seyfried 2017-01-17 01:14:53 +00:00
parent f2d1407743
commit 6466f55ebc
9 changed files with 68 additions and 88 deletions

View file

@ -223,7 +223,7 @@ pub fn filemap_to_tts(sess: &ParseSess, filemap: Rc<FileMap>)
-> Vec<tokenstream::TokenTree> {
// it appears to me that the cfg doesn't matter here... indeed,
// parsing tt's probably shouldn't require a parser at all.
let srdr = lexer::StringReader::new(&sess.span_diagnostic, filemap);
let srdr = lexer::StringReader::new(sess, filemap);
let mut p1 = Parser::new(sess, Box::new(srdr), None, false);
panictry!(p1.parse_all_token_trees())
}