diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parser/event_parser/grammar/paths.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs index 74b0e0ed4..16a8ce239 100644 --- a/src/parser/event_parser/grammar/paths.rs +++ b/src/parser/event_parser/grammar/paths.rs | |||
@@ -5,16 +5,20 @@ pub(crate) fn use_path(p: &mut Parser) { | |||
5 | return; | 5 | return; |
6 | } | 6 | } |
7 | node(p, PATH, |p| { | 7 | node(p, PATH, |p| { |
8 | p.eat(COLONCOLON); | 8 | path_segment(p, true); |
9 | path_segment(p); | ||
10 | }); | 9 | }); |
11 | many(p, |p| { | 10 | many(p, |p| { |
12 | node_if(p, COLONCOLON, PATH, |p| { | 11 | node_if(p, COLONCOLON, PATH, |p| { |
13 | path_segment(p); | 12 | path_segment(p, false); |
14 | }) | 13 | }) |
15 | }); | 14 | }); |
16 | } | 15 | } |
17 | 16 | ||
18 | fn path_segment(p: &mut Parser) -> bool { | 17 | fn path_segment(p: &mut Parser, first: bool) { |
19 | node_if(p, IDENT, PATH_SEGMENT, |_| ()) | 18 | node(p, PATH_SEGMENT, |p| { |
19 | if first { | ||
20 | p.eat(COLONCOLON); | ||
21 | } | ||
22 | p.expect(IDENT); | ||
23 | }) | ||
20 | } \ No newline at end of file | 24 | } \ No newline at end of file |