aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-09-12 10:40:16 +0100
committerGitHub <[email protected]>2019-09-12 10:40:16 +0100
commitfd9e6c649f9428881921dfcd4cc7af05d1df5440 (patch)
tree38f7abdcd5c1ea03f8937e31504608320a46dd19 /crates/ra_parser
parentd614f463dedc269bd766f74024745e4fb6ba7020 (diff)
parent3c68da792b52b9071e7e9bdac2b1cf8eb3c9e77b (diff)
Merge #1826
1826: don't break parser error recovery in presence of macros r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_parser/src/parser.rs b/crates/ra_parser/src/parser.rs
index a2ac363fb..f8fba6860 100644
--- a/crates/ra_parser/src/parser.rs
+++ b/crates/ra_parser/src/parser.rs
@@ -5,7 +5,7 @@ use drop_bomb::DropBomb;
5use crate::{ 5use crate::{
6 event::Event, 6 event::Event,
7 ParseError, 7 ParseError,
8 SyntaxKind::{self, EOF, ERROR, L_DOLLAR, R_DOLLAR, TOMBSTONE}, 8 SyntaxKind::{self, EOF, ERROR, TOMBSTONE},
9 TokenSet, TokenSource, T, 9 TokenSet, TokenSource, T,
10}; 10};
11 11
@@ -212,7 +212,7 @@ impl<'t> Parser<'t> {
212 /// Create an error node and consume the next token. 212 /// Create an error node and consume the next token.
213 pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) { 213 pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) {
214 match self.current() { 214 match self.current() {
215 T!['{'] | T!['}'] | L_DOLLAR | R_DOLLAR => { 215 T!['{'] | T!['}'] => {
216 self.error(message); 216 self.error(message);
217 return; 217 return;
218 } 218 }