diff options
Diffstat (limited to 'src/parser/mod.rs')
-rw-r--r-- | src/parser/mod.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 26fbb6e3d..b7d5e5832 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs | |||
@@ -7,7 +7,7 @@ mod grammar; | |||
7 | 7 | ||
8 | use std::sync::Arc; | 8 | use std::sync::Arc; |
9 | use { | 9 | use { |
10 | File, SyntaxKind, Token, | 10 | Token, |
11 | yellow::SyntaxNode, | 11 | yellow::SyntaxNode, |
12 | syntax_kinds::* | 12 | syntax_kinds::* |
13 | }; | 13 | }; |
@@ -16,18 +16,6 @@ use parser::event::process; | |||
16 | 16 | ||
17 | 17 | ||
18 | /// Parse a sequence of tokens into the representative node tree | 18 | /// Parse a sequence of tokens into the representative node tree |
19 | pub fn parse(text: String, tokens: &[Token]) -> File { | ||
20 | let events = { | ||
21 | let input = input::ParserInput::new(&text, tokens); | ||
22 | let parser_impl = parser::imp::ParserImpl::new(&input); | ||
23 | let mut parser = parser::Parser(parser_impl); | ||
24 | grammar::file(&mut parser); | ||
25 | parser.0.into_events() | ||
26 | }; | ||
27 | event::to_file(text, tokens, events) | ||
28 | } | ||
29 | |||
30 | /// Parse a sequence of tokens into the representative node tree | ||
31 | pub fn parse_green(text: String, tokens: &[Token]) -> SyntaxNode { | 19 | pub fn parse_green(text: String, tokens: &[Token]) -> SyntaxNode { |
32 | let events = { | 20 | let events = { |
33 | let input = input::ParserInput::new(&text, tokens); | 21 | let input = input::ParserInput::new(&text, tokens); |