From 41bf98d2493138d09e8c127f0914b2cf034cfa34 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 11 Jan 2018 20:55:08 +0300 Subject: G: multisegment paths --- src/parser/event_parser/grammar/paths.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs index 96966b380..74b0e0ed4 100644 --- a/src/parser/event_parser/grammar/paths.rs +++ b/src/parser/event_parser/grammar/paths.rs @@ -7,9 +7,14 @@ pub(crate) fn use_path(p: &mut Parser) { node(p, PATH, |p| { p.eat(COLONCOLON); path_segment(p); - }) + }); + many(p, |p| { + node_if(p, COLONCOLON, PATH, |p| { + path_segment(p); + }) + }); } fn path_segment(p: &mut Parser) -> bool { - node_if(p, IDENT, PATH_SEGMENT, |p| ()) + node_if(p, IDENT, PATH_SEGMENT, |_| ()) } \ No newline at end of file -- cgit v1.2.3