diff options
author | Aleksey Kladov <[email protected]> | 2019-02-20 19:52:32 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-20 19:52:32 +0000 |
commit | cce23fddba4241202ebd29cce44db4ce9a08793a (patch) | |
tree | 6f1385feff4b4cdfaac1fb9b93abad4757fc6918 /crates/ra_syntax/src/parsing | |
parent | 2acb21e8f72896c7a2855ca6042d0ee1870d8643 (diff) |
flattern module structure
Diffstat (limited to 'crates/ra_syntax/src/parsing')
-rw-r--r-- | crates/ra_syntax/src/parsing/event.rs (renamed from crates/ra_syntax/src/parsing/parser_impl/event.rs) | 4 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/input.rs (renamed from crates/ra_syntax/src/parsing/parser_impl/input.rs) | 3 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/parser_api.rs | 2 | ||||
-rw-r--r-- | crates/ra_syntax/src/parsing/reparsing.rs | 6 |
4 files changed, 6 insertions, 9 deletions
diff --git a/crates/ra_syntax/src/parsing/parser_impl/event.rs b/crates/ra_syntax/src/parsing/event.rs index 9663fba35..893a42e9a 100644 --- a/crates/ra_syntax/src/parsing/parser_impl/event.rs +++ b/crates/ra_syntax/src/parsing/event.rs | |||
@@ -20,7 +20,7 @@ use crate::{ | |||
20 | }, | 20 | }, |
21 | parsing::{ | 21 | parsing::{ |
22 | lexer::Token, | 22 | lexer::Token, |
23 | parser_impl::TreeSink, | 23 | TreeSink, |
24 | }, | 24 | }, |
25 | }; | 25 | }; |
26 | 26 | ||
@@ -113,7 +113,7 @@ impl<'a, S: TreeSink> EventProcessor<'a, S> { | |||
113 | } | 113 | } |
114 | 114 | ||
115 | /// Generate the syntax tree with the control of events. | 115 | /// Generate the syntax tree with the control of events. |
116 | pub(super) fn process(mut self) -> S { | 116 | pub(crate) fn process(mut self) -> S { |
117 | let mut forward_parents = Vec::new(); | 117 | let mut forward_parents = Vec::new(); |
118 | 118 | ||
119 | for i in 0..self.events.len() { | 119 | for i in 0..self.events.len() { |
diff --git a/crates/ra_syntax/src/parsing/parser_impl/input.rs b/crates/ra_syntax/src/parsing/input.rs index 11b32b9ce..0f1810df5 100644 --- a/crates/ra_syntax/src/parsing/parser_impl/input.rs +++ b/crates/ra_syntax/src/parsing/input.rs | |||
@@ -1,8 +1,7 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | SyntaxKind, SyntaxKind::EOF, TextRange, TextUnit, | 2 | SyntaxKind, SyntaxKind::EOF, TextRange, TextUnit, |
3 | parsing::{ | 3 | parsing::{ |
4 | TokenPos, | 4 | TokenPos, TokenSource, |
5 | parser_impl::TokenSource, | ||
6 | lexer::Token, | 5 | lexer::Token, |
7 | }, | 6 | }, |
8 | }; | 7 | }; |
diff --git a/crates/ra_syntax/src/parsing/parser_api.rs b/crates/ra_syntax/src/parsing/parser_api.rs index 92d7895d3..99f6183a4 100644 --- a/crates/ra_syntax/src/parsing/parser_api.rs +++ b/crates/ra_syntax/src/parsing/parser_api.rs | |||
@@ -8,7 +8,7 @@ use crate::{ | |||
8 | parsing::{ | 8 | parsing::{ |
9 | TokenSource, TokenPos, | 9 | TokenSource, TokenPos, |
10 | token_set::TokenSet, | 10 | token_set::TokenSet, |
11 | parser_impl::event::Event, | 11 | event::Event, |
12 | }, | 12 | }, |
13 | }; | 13 | }; |
14 | 14 | ||
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs index edf3fa291..f45326dff 100644 --- a/crates/ra_syntax/src/parsing/reparsing.rs +++ b/crates/ra_syntax/src/parsing/reparsing.rs | |||
@@ -4,8 +4,7 @@ use crate::{ | |||
4 | syntax_node::{GreenNode, SyntaxNode}, | 4 | syntax_node::{GreenNode, SyntaxNode}, |
5 | syntax_error::SyntaxError, | 5 | syntax_error::SyntaxError, |
6 | parsing::{ | 6 | parsing::{ |
7 | grammar, | 7 | grammar, parse_with, |
8 | parser_impl, | ||
9 | builder::GreenBuilder, | 8 | builder::GreenBuilder, |
10 | parser_api::Parser, | 9 | parser_api::Parser, |
11 | lexer::{tokenize, Token}, | 10 | lexer::{tokenize, Token}, |
@@ -62,8 +61,7 @@ fn reparse_block<'node>( | |||
62 | if !is_balanced(&tokens) { | 61 | if !is_balanced(&tokens) { |
63 | return None; | 62 | return None; |
64 | } | 63 | } |
65 | let (green, new_errors) = | 64 | let (green, new_errors) = parse_with(GreenBuilder::new(), &text, &tokens, reparser); |
66 | parser_impl::parse_with(GreenBuilder::new(), &text, &tokens, reparser); | ||
67 | Some((node, green, new_errors)) | 65 | Some((node, green, new_errors)) |
68 | } | 66 | } |
69 | 67 | ||