aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/grammar/expressions
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser/src/grammar/expressions')
-rw-r--r--crates/parser/src/grammar/expressions/atom.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/parser/src/grammar/expressions/atom.rs b/crates/parser/src/grammar/expressions/atom.rs
index 18b63feb7..e897d5a52 100644
--- a/crates/parser/src/grammar/expressions/atom.rs
+++ b/crates/parser/src/grammar/expressions/atom.rs
@@ -156,11 +156,13 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker {
156 let mut saw_expr = false; 156 let mut saw_expr = false;
157 while !p.at(EOF) && !p.at(T![')']) { 157 while !p.at(EOF) && !p.at(T![')']) {
158 saw_expr = true; 158 saw_expr = true;
159 if !p.at_ts(EXPR_FIRST) { 159
160 p.error("expected expression"); 160 // test tuple_attrs
161 // const A: (i64, i64) = (1, #[cfg(test)] 2);
162 if !expr_with_attrs(p) {
161 break; 163 break;
162 } 164 }
163 expr(p); 165
164 if !p.at(T![')']) { 166 if !p.at(T![')']) {
165 saw_comma = true; 167 saw_comma = true;
166 p.expect(T![,]); 168 p.expect(T![,]);