From c47f9e2d37d4797550638e2a7a4fd3538e9edae9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 21 Feb 2019 13:37:32 +0300 Subject: fix compilation --- crates/ra_parser/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_parser/src') 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 { ) -> Option { grammar::reparser(node, first_child, parent).map(Reparser) } -} -pub fn reparse(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink, reparser: Reparser) { - let Reparser(r) = reparser; - let mut p = parser::Parser::new(token_source); - r(&mut p); - let events = p.finish(); - event::process(tree_sink, events); + pub fn parse(self, token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) { + let Reparser(r) = self; + let mut p = parser::Parser::new(token_source); + r(&mut p); + let events = p.finish(); + event::process(tree_sink, events); + } } -- cgit v1.2.3