aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/parser_api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/parser_api.rs')
-rw-r--r--crates/libsyntax2/src/parser_api.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/parser_api.rs b/crates/libsyntax2/src/parser_api.rs
index bb34fe973..0a3b29b70 100644
--- a/crates/libsyntax2/src/parser_api.rs
+++ b/crates/libsyntax2/src/parser_api.rs
@@ -141,7 +141,9 @@ impl<'t> Parser<'t> {
141 pub(crate) fn err_and_bump(&mut self, message: &str) { 141 pub(crate) fn err_and_bump(&mut self, message: &str) {
142 let m = self.start(); 142 let m = self.start();
143 self.error(message); 143 self.error(message);
144 self.bump(); 144 if !self.at(SyntaxKind::L_CURLY) && !self.at(SyntaxKind::R_CURLY) {
145 self.bump();
146 }
145 m.complete(self, ERROR); 147 m.complete(self, ERROR);
146 } 148 }
147} 149}