diff options
Diffstat (limited to 'src/parser/event_parser/grammar/mod.rs')
-rw-r--r-- | src/parser/event_parser/grammar/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/parser/event_parser/grammar/mod.rs b/src/parser/event_parser/grammar/mod.rs index c3d0c8c10..d3b63c4c1 100644 --- a/src/parser/event_parser/grammar/mod.rs +++ b/src/parser/event_parser/grammar/mod.rs | |||
@@ -10,15 +10,15 @@ mod types; | |||
10 | mod paths; | 10 | mod paths; |
11 | 11 | ||
12 | pub(crate) fn file(p: &mut Parser) { | 12 | pub(crate) fn file(p: &mut Parser) { |
13 | p.start(FILE); | 13 | let file = p.start(); |
14 | p.eat(SHEBANG); | 14 | p.eat(SHEBANG); |
15 | items::mod_contents(p); | 15 | items::mod_contents(p); |
16 | p.finish() | 16 | file.complete(p, FILE); |
17 | } | 17 | } |
18 | 18 | ||
19 | fn visibility(p: &mut Parser) { | 19 | fn visibility(p: &mut Parser) { |
20 | if p.at(PUB_KW) { | 20 | if p.at(PUB_KW) { |
21 | p.start(VISIBILITY); | 21 | let vis = p.start(); |
22 | p.bump(); | 22 | p.bump(); |
23 | if p.at(L_PAREN) { | 23 | if p.at(L_PAREN) { |
24 | match p.raw_lookahead(1) { | 24 | match p.raw_lookahead(1) { |
@@ -32,16 +32,16 @@ fn visibility(p: &mut Parser) { | |||
32 | _ => () | 32 | _ => () |
33 | } | 33 | } |
34 | } | 34 | } |
35 | p.finish(); | 35 | vis.complete(p, VISIBILITY); |
36 | } | 36 | } |
37 | } | 37 | } |
38 | 38 | ||
39 | fn alias(p: &mut Parser) -> bool { | 39 | fn alias(p: &mut Parser) -> bool { |
40 | if p.at(AS_KW) { | 40 | if p.at(AS_KW) { |
41 | p.start(ALIAS); | 41 | let alias = p.start(); |
42 | p.bump(); | 42 | p.bump(); |
43 | p.expect(IDENT); | 43 | p.expect(IDENT); |
44 | p.finish(); | 44 | alias.complete(p, ALIAS); |
45 | } | 45 | } |
46 | true //FIXME: return false if three are errors | 46 | true //FIXME: return false if three are errors |
47 | } | 47 | } |