mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-23 10:33:52 +00:00
Fix edition used for include macro parsing
This commit is contained in:
parent
f4199f786e
commit
92f5e806f1
6 changed files with 17 additions and 13 deletions
|
@ -12,7 +12,7 @@ pub(crate) use crate::parsing::reparsing::incremental_reparse;
|
|||
pub(crate) fn parse_text(text: &str, edition: parser::Edition) -> (GreenNode, Vec<SyntaxError>) {
|
||||
let _p = tracing::info_span!("parse_text").entered();
|
||||
let lexed = parser::LexedStr::new(edition, text);
|
||||
let parser_input = lexed.to_input();
|
||||
let parser_input = lexed.to_input(edition);
|
||||
let parser_output = parser::TopEntryPoint::SourceFile.parse(&parser_input, edition);
|
||||
let (node, errors, _eof) = build_tree(lexed, parser_output);
|
||||
(node, errors)
|
||||
|
@ -25,7 +25,7 @@ pub(crate) fn parse_text_at(
|
|||
) -> (GreenNode, Vec<SyntaxError>) {
|
||||
let _p = tracing::info_span!("parse_text_at").entered();
|
||||
let lexed = parser::LexedStr::new(edition, text);
|
||||
let parser_input = lexed.to_input();
|
||||
let parser_input = lexed.to_input(edition);
|
||||
let parser_output = entry.parse(&parser_input, edition);
|
||||
let (node, errors, _eof) = build_tree(lexed, parser_output);
|
||||
(node, errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue