Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/parser.rs')
| -rw-r--r-- | crates/parser/src/parser.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/crates/parser/src/parser.rs b/crates/parser/src/parser.rs index 89dfea52f8..5820ffd77d 100644 --- a/crates/parser/src/parser.rs +++ b/crates/parser/src/parser.rs @@ -7,7 +7,7 @@ use drop_bomb::DropBomb; use crate::{ event::Event, ParseError, - SyntaxKind::{self, EOF, ERROR, L_DOLLAR, R_DOLLAR, TOMBSTONE}, + SyntaxKind::{self, EOF, ERROR, TOMBSTONE}, TokenSet, TokenSource, T, }; @@ -215,23 +215,13 @@ impl<'t> Parser<'t> { /// Create an error node and consume the next token. pub(crate) fn err_and_bump(&mut self, message: &str) { - match self.current() { - L_DOLLAR | R_DOLLAR => { - let m = self.start(); - self.error(message); - self.bump_any(); - m.complete(self, ERROR); - } - _ => { - self.err_recover(message, TokenSet::EMPTY); - } - } + self.err_recover(message, TokenSet::EMPTY); } /// Create an error node and consume the next token. pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) { match self.current() { - T!['{'] | T!['}'] | L_DOLLAR | R_DOLLAR => { + T!['{'] | T!['}'] => { self.error(message); return; } |