mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
rename
This commit is contained in:
parent
e5fb33a946
commit
0c1cb98182
4 changed files with 19 additions and 23 deletions
|
@ -2,17 +2,13 @@
|
|||
//! incremental reparsing.
|
||||
|
||||
mod lexer;
|
||||
mod input;
|
||||
mod builder;
|
||||
mod text_token_source;
|
||||
mod text_tree_sink;
|
||||
mod reparsing;
|
||||
|
||||
use crate::{
|
||||
SyntaxError,
|
||||
syntax_node::GreenNode,
|
||||
parsing::{
|
||||
builder::TreeBuilder,
|
||||
input::ParserInput,
|
||||
},
|
||||
};
|
||||
|
||||
pub use self::lexer::{tokenize, Token};
|
||||
|
@ -21,8 +17,8 @@ pub(crate) use self::reparsing::incremental_reparse;
|
|||
|
||||
pub(crate) fn parse_text(text: &str) -> (GreenNode, Vec<SyntaxError>) {
|
||||
let tokens = tokenize(&text);
|
||||
let token_source = ParserInput::new(text, &tokens);
|
||||
let mut tree_sink = TreeBuilder::new(text, &tokens);
|
||||
let token_source = text_token_source::TextTokenSource::new(text, &tokens);
|
||||
let mut tree_sink = text_tree_sink::TextTreeSink::new(text, &tokens);
|
||||
ra_parser::parse(&token_source, &mut tree_sink);
|
||||
tree_sink.finish()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue