rustc_parse: Remove Parser::normalized(_prev)_token
This commit is contained in:
parent
43b27df5b2
commit
5d7f67d3b1
2 changed files with 7 additions and 40 deletions
|
@ -4,7 +4,7 @@
|
|||
#![feature(crate_visibility_modifier)]
|
||||
|
||||
use rustc_ast::ast;
|
||||
use rustc_ast::token::{self, Nonterminal, Token};
|
||||
use rustc_ast::token::{self, Nonterminal};
|
||||
use rustc_ast::tokenstream::{self, TokenStream, TokenTree};
|
||||
use rustc_ast_pretty::pprust;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
|
@ -171,8 +171,7 @@ fn maybe_source_file_to_parser(
|
|||
let mut parser = stream_to_parser(sess, stream, None);
|
||||
parser.unclosed_delims = unclosed_delims;
|
||||
if parser.token == token::Eof {
|
||||
let span = Span::new(end_pos, end_pos, parser.token.span.ctxt());
|
||||
parser.set_token(Token::new(token::Eof, span));
|
||||
parser.token.span = Span::new(end_pos, end_pos, parser.token.span.ctxt());
|
||||
}
|
||||
|
||||
Ok(parser)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue