diff options
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_parser/src/lib.rs b/crates/ra_parser/src/lib.rs index fbbac4c69..7931b5189 100644 --- a/crates/ra_parser/src/lib.rs +++ b/crates/ra_parser/src/lib.rs | |||
@@ -53,12 +53,12 @@ impl Reparser { | |||
53 | ) -> Option<Reparser> { | 53 | ) -> Option<Reparser> { |
54 | grammar::reparser(node, first_child, parent).map(Reparser) | 54 | grammar::reparser(node, first_child, parent).map(Reparser) |
55 | } | 55 | } |
56 | } | ||
57 | 56 | ||
58 | pub fn reparse(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink, reparser: Reparser) { | 57 | pub fn parse(self, token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) { |
59 | let Reparser(r) = reparser; | 58 | let Reparser(r) = self; |
60 | let mut p = parser::Parser::new(token_source); | 59 | let mut p = parser::Parser::new(token_source); |
61 | r(&mut p); | 60 | r(&mut p); |
62 | let events = p.finish(); | 61 | let events = p.finish(); |
63 | event::process(tree_sink, events); | 62 | event::process(tree_sink, events); |
63 | } | ||
64 | } | 64 | } |