From 50a02eb3593591a02677e1b56f24d7ff0459b9d0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 12 Aug 2020 17:06:49 +0200 Subject: Rename ra_parser -> parser --- crates/ra_syntax/src/parsing.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_syntax/src/parsing.rs') diff --git a/crates/ra_syntax/src/parsing.rs b/crates/ra_syntax/src/parsing.rs index 0ed3c20ef..68a39eb21 100644 --- a/crates/ra_syntax/src/parsing.rs +++ b/crates/ra_syntax/src/parsing.rs @@ -1,4 +1,4 @@ -//! Lexing, bridging to ra_parser (which does the actual parsing) and +//! Lexing, bridging to parser (which does the actual parsing) and //! incremental reparsing. mod lexer; @@ -13,7 +13,7 @@ use text_tree_sink::TextTreeSink; pub use lexer::*; pub(crate) use self::reparsing::incremental_reparse; -use ra_parser::SyntaxKind; +use parser::SyntaxKind; pub(crate) fn parse_text(text: &str) -> (GreenNode, Vec) { let (tokens, lexer_errors) = tokenize(&text); @@ -21,7 +21,7 @@ pub(crate) fn parse_text(text: &str) -> (GreenNode, Vec) { let mut token_source = TextTokenSource::new(text, &tokens); let mut tree_sink = TextTreeSink::new(text, &tokens); - ra_parser::parse(&mut token_source, &mut tree_sink); + parser::parse(&mut token_source, &mut tree_sink); let (tree, mut parser_errors) = tree_sink.finish(); parser_errors.extend(lexer_errors); @@ -32,7 +32,7 @@ pub(crate) fn parse_text(text: &str) -> (GreenNode, Vec) { /// Returns `text` parsed as a `T` provided there are no parse errors. pub(crate) fn parse_text_fragment( text: &str, - fragment_kind: ra_parser::FragmentKind, + fragment_kind: parser::FragmentKind, ) -> Result { let (tokens, lexer_errors) = tokenize(&text); if !lexer_errors.is_empty() { @@ -44,13 +44,13 @@ pub(crate) fn parse_text_fragment( // TextTreeSink assumes that there's at least some root node to which it can attach errors and // tokens. We arbitrarily give it a SourceFile. - use ra_parser::TreeSink; + use parser::TreeSink; tree_sink.start_node(SyntaxKind::SOURCE_FILE); - ra_parser::parse_fragment(&mut token_source, &mut tree_sink, fragment_kind); + parser::parse_fragment(&mut token_source, &mut tree_sink, fragment_kind); tree_sink.finish_node(); let (tree, parser_errors) = tree_sink.finish(); - use ra_parser::TokenSource; + use parser::TokenSource; if !parser_errors.is_empty() || token_source.current().kind != SyntaxKind::EOF { return Err(()); } -- cgit v1.2.3