mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-23 18:42:59 +00:00
Add always disabled gen parse support
This commit is contained in:
parent
983c9c122e
commit
7011094685
32 changed files with 376 additions and 55 deletions
|
@ -11,7 +11,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(text);
|
||||
let lexed = parser::LexedStr::new(edition, text);
|
||||
let parser_input = lexed.to_input();
|
||||
let parser_output = parser::TopEntryPoint::SourceFile.parse(&parser_input, edition);
|
||||
let (node, errors, _eof) = build_tree(lexed, parser_output);
|
||||
|
@ -24,7 +24,7 @@ pub(crate) fn parse_text_at(
|
|||
edition: parser::Edition,
|
||||
) -> (GreenNode, Vec<SyntaxError>) {
|
||||
let _p = tracing::info_span!("parse_text_at").entered();
|
||||
let lexed = parser::LexedStr::new(text);
|
||||
let lexed = parser::LexedStr::new(edition, text);
|
||||
let parser_input = lexed.to_input();
|
||||
let parser_output = entry.parse(&parser_input, edition);
|
||||
let (node, errors, _eof) = build_tree(lexed, parser_output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue