aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/items
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/grammar/items')
-rw-r--r--crates/libsyntax2/src/grammar/items/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs
index 5466146b4..57742ecb9 100644
--- a/crates/libsyntax2/src/grammar/items/mod.rs
+++ b/crates/libsyntax2/src/grammar/items/mod.rs
@@ -355,7 +355,12 @@ pub(super) fn token_tree(p: &mut Parser) {
355 while !p.at(EOF) && !p.at(closing_paren_kind) { 355 while !p.at(EOF) && !p.at(closing_paren_kind) {
356 match p.current() { 356 match p.current() {
357 L_CURLY | L_PAREN | L_BRACK => token_tree(p), 357 L_CURLY | L_PAREN | L_BRACK => token_tree(p),
358 R_CURLY | R_PAREN | R_BRACK => p.err_and_bump("unmatched brace"), 358 R_CURLY => {
359 p.error("unmatched `}`");
360 m.complete(p, TOKEN_TREE);
361 return;
362 }
363 R_PAREN | R_BRACK => p.err_and_bump("unmatched brace"),
359 _ => p.bump() 364 _ => p.bump()
360 } 365 }
361 }; 366 };