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.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/parser/event_parser/grammar/attributes.rs b/src/parser/event_parser/grammar/attributes.rs
index 045840059..8bf04afce 100644
--- a/src/parser/event_parser/grammar/attributes.rs
+++ b/src/parser/event_parser/grammar/attributes.rs
@@ -12,8 +12,7 @@ pub(super) fn outer_attributes(p: &mut Parser) {
12 } 12 }
13} 13}
14 14
15 15fn attribute(p: &mut Parser, inner: bool) {
16fn attribute(p: &mut Parser, inner: bool){
17 let attr = p.start(); 16 let attr = p.start();
18 assert!(p.at(POUND)); 17 assert!(p.at(POUND));
19 p.bump(); 18 p.bump();
@@ -38,9 +37,7 @@ fn meta_item(p: &mut Parser) {
38 EQ => { 37 EQ => {
39 p.bump(); 38 p.bump();
40 if !expressions::literal(p) { 39 if !expressions::literal(p) {
41 p.error() 40 p.error().message("expected literal").emit();
42 .message("expected literal")
43 .emit();
44 } 41 }
45 } 42 }
46 L_PAREN => meta_item_arg_list(p), 43 L_PAREN => meta_item_arg_list(p),
@@ -48,9 +45,7 @@ fn meta_item(p: &mut Parser) {
48 } 45 }
49 meta_item.complete(p, META_ITEM); 46 meta_item.complete(p, META_ITEM);
50 } else { 47 } else {
51 p.error() 48 p.error().message("expected attribute value").emit()
52 .message("expected attribute value")
53 .emit()
54 } 49 }
55} 50}
56 51
@@ -73,8 +68,8 @@ fn meta_item_arg_list(p: &mut Parser) {
73 p.error().message(message).emit(); 68 p.error().message(message).emit();
74 p.bump(); 69 p.bump();
75 err.complete(p, ERROR); 70 err.complete(p, ERROR);
76 continue 71 continue;
77 } 72 },
78 } 73 }
79 if !p.at(R_PAREN) { 74 if !p.at(R_PAREN) {
80 p.expect(COMMA); 75 p.expect(COMMA);