aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/event_parser/grammar/mod.rs')
-rw-r--r--src/parser/event_parser/grammar/mod.rs20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/parser/event_parser/grammar/mod.rs b/src/parser/event_parser/grammar/mod.rs
index 3c4b223a9..1c57e0cb4 100644
--- a/src/parser/event_parser/grammar/mod.rs
+++ b/src/parser/event_parser/grammar/mod.rs
@@ -15,7 +15,25 @@ pub(crate) fn file(p: &mut Parser) {
15 }) 15 })
16} 16}
17 17
18fn visibility(_: &mut Parser) { 18fn visibility(p: &mut Parser) {
19 node_if(p, PUB_KW, VISIBILITY, |p| {
20 if p.current() != L_PAREN {
21 return
22 }
23 match p.raw_lookahead(1) {
24 CRATE_KW | SELF_KW | SUPER_KW => {
25 p.bump();
26 p.bump();
27 }
28 IN_KW => {
29 p.bump();
30 p.bump();
31 paths::use_path(p);
32 }
33 _ => return
34 }
35 p.expect(R_PAREN);
36 });
19} 37}
20 38
21fn alias(p: &mut Parser) -> bool { 39fn alias(p: &mut Parser) -> bool {