aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/event_parser')
-rw-r--r--src/parser/event_parser/grammar/items.rs23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/parser/event_parser/grammar/items.rs b/src/parser/event_parser/grammar/items.rs
index 7ae48b5db..f96f4cc9c 100644
--- a/src/parser/event_parser/grammar/items.rs
+++ b/src/parser/event_parser/grammar/items.rs
@@ -22,7 +22,7 @@ fn item(p: &mut Parser){
22 err_token => { 22 err_token => {
23 p.start(ERROR); 23 p.start(ERROR);
24 let message = if err_token == SEMI { 24 let message = if err_token == SEMI {
25 //TODO: if the item is incomplete, this messsage is misleading 25 //TODO: if the item is incomplete, this message is misleading
26 "expected item, found `;`\n\ 26 "expected item, found `;`\n\
27 consider removing this semicolon" 27 consider removing this semicolon"
28 } else { 28 } else {
@@ -97,13 +97,12 @@ fn named_fields(p: &mut Parser) {
97 })); 97 }));
98 98
99 fn named_field(p: &mut Parser) { 99 fn named_field(p: &mut Parser) {
100 node(p, NAMED_FIELD, |p| { 100 p.start(NAMED_FIELD);
101 visibility(p); 101 visibility(p);
102 p.expect(IDENT) && p.expect(COLON) && { 102 if p.expect(IDENT) && p.expect(COLON) {
103 types::type_ref(p); 103 types::type_ref(p);
104 true 104 };
105 }; 105 p.finish()
106 })
107 } 106 }
108} 107}
109 108
@@ -118,10 +117,10 @@ fn tuple_fields(p: &mut Parser) {
118 p.expect(R_PAREN); 117 p.expect(R_PAREN);
119 118
120 fn tuple_field(p: &mut Parser) { 119 fn tuple_field(p: &mut Parser) {
121 node(p, POS_FIELD, |p| { 120 p.start(POS_FIELD);
122 visibility(p); 121 visibility(p);
123 types::type_ref(p); 122 types::type_ref(p);
124 }) 123 p.finish();
125 } 124 }
126} 125}
127 126