diff options
Diffstat (limited to 'crates/ra_syntax/src/parsing/parser_impl.rs')
-rw-r--r-- | crates/ra_syntax/src/parsing/parser_impl.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/crates/ra_syntax/src/parsing/parser_impl.rs b/crates/ra_syntax/src/parsing/parser_impl.rs deleted file mode 100644 index 6eed0e656..000000000 --- a/crates/ra_syntax/src/parsing/parser_impl.rs +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | pub(super) mod event; | ||
2 | pub(super) mod input; | ||
3 | |||
4 | use crate::parsing::{ | ||
5 | TreeSink, TokenSource, | ||
6 | lexer::Token, | ||
7 | parser_api::Parser, | ||
8 | parser_impl::event::EventProcessor, | ||
9 | }; | ||
10 | |||
11 | /// Parse a sequence of tokens into the representative node tree | ||
12 | pub(super) fn parse_with<S: TreeSink>( | ||
13 | sink: S, | ||
14 | text: &str, | ||
15 | tokens: &[Token], | ||
16 | parser: fn(&mut Parser), | ||
17 | ) -> S::Tree { | ||
18 | let mut events = { | ||
19 | let input = input::ParserInput::new(text, tokens); | ||
20 | let mut parser_api = Parser::new(&input); | ||
21 | parser(&mut parser_api); | ||
22 | parser_api.finish() | ||
23 | }; | ||
24 | EventProcessor::new(sink, text, tokens, &mut events).process().finish() | ||
25 | } | ||