aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-21 10:37:32 +0000
committerAleksey Kladov <[email protected]>2019-02-21 10:37:32 +0000
commitc47f9e2d37d4797550638e2a7a4fd3538e9edae9 (patch)
treeffa9276d91e6bdfc3926322f66e6700e6ebbe3b2 /crates/ra_parser/src
parentd334b5a1db9ec6a57f54077d422a3f4b3c8c1178 (diff)
fix compilation
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/lib.rs14
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
58pub 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}