mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Add edition to all parse
functions of the parser crate
This commit is contained in:
parent
392538c830
commit
454e481422
9 changed files with 16 additions and 20 deletions
|
@ -131,7 +131,7 @@ where
|
|||
_ => TokenBuffer::from_subtree(tt),
|
||||
};
|
||||
let parser_input = to_parser_input(&buffer);
|
||||
let parser_output = entry_point.parse(&parser_input);
|
||||
let parser_output = entry_point.parse(&parser_input, parser::Edition::Edition2021);
|
||||
let mut tree_sink = TtTreeSink::new(buffer.begin());
|
||||
for event in parser_output.iter() {
|
||||
match event {
|
||||
|
|
|
@ -143,7 +143,7 @@ impl<'a, S: Copy + fmt::Debug> TtIter<'a, S> {
|
|||
) -> ExpandResult<Option<tt::TokenTree<S>>> {
|
||||
let buffer = tt::buffer::TokenBuffer::from_tokens(self.inner.as_slice());
|
||||
let parser_input = to_parser_input(&buffer);
|
||||
let tree_traversal = entry_point.parse(&parser_input);
|
||||
let tree_traversal = entry_point.parse(&parser_input, parser::Edition::Edition2021);
|
||||
let mut cursor = buffer.begin();
|
||||
let mut error = false;
|
||||
for step in tree_traversal.iter() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue