aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/attributes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/event_parser/grammar/attributes.rs')
-rw-r--r--src/parser/event_parser/grammar/attributes.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser/event_parser/grammar/attributes.rs b/src/parser/event_parser/grammar/attributes.rs
index 8b5e5bcfe..2d04a1a41 100644
--- a/src/parser/event_parser/grammar/attributes.rs
+++ b/src/parser/event_parser/grammar/attributes.rs
@@ -19,13 +19,13 @@ fn attribute(p: &mut Parser, kind: AttrKind) -> bool {
19 if kind == AttrKind::Inner && p.raw_lookahead(1) != EXCL { 19 if kind == AttrKind::Inner && p.raw_lookahead(1) != EXCL {
20 return false; 20 return false;
21 } 21 }
22 p.start(ATTR); 22 let attr = p.start();
23 p.bump(); 23 p.bump();
24 if kind == AttrKind::Inner { 24 if kind == AttrKind::Inner {
25 p.bump(); 25 p.bump();
26 } 26 }
27 p.expect(L_BRACK) && meta_item(p) && p.expect(R_BRACK); 27 p.expect(L_BRACK) && meta_item(p) && p.expect(R_BRACK);
28 p.finish(); 28 attr.complete(p, ATTR);
29 true 29 true
30 } else { 30 } else {
31 false 31 false
@@ -34,7 +34,7 @@ fn attribute(p: &mut Parser, kind: AttrKind) -> bool {
34 34
35fn meta_item(p: &mut Parser) -> bool { 35fn meta_item(p: &mut Parser) -> bool {
36 if p.at(IDENT) { 36 if p.at(IDENT) {
37 p.start(META_ITEM); 37 let meta_item = p.start();
38 p.bump(); 38 p.bump();
39 if p.eat(EQ) { 39 if p.eat(EQ) {
40 if !expressions::literal(p) { 40 if !expressions::literal(p) {
@@ -46,7 +46,7 @@ fn meta_item(p: &mut Parser) -> bool {
46 comma_list(p, R_PAREN, meta_item_inner); 46 comma_list(p, R_PAREN, meta_item_inner);
47 p.expect(R_PAREN); 47 p.expect(R_PAREN);
48 } 48 }
49 p.finish(); 49 meta_item.complete(p, META_ITEM);
50 true 50 true
51 } else { 51 } else {
52 false 52 false