diff options
Diffstat (limited to 'crates/ra_syntax/src/parsing/event.rs')
-rw-r--r-- | crates/ra_syntax/src/parsing/event.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/crates/ra_syntax/src/parsing/event.rs b/crates/ra_syntax/src/parsing/event.rs index 893a42e9a..f6f020eab 100644 --- a/crates/ra_syntax/src/parsing/event.rs +++ b/crates/ra_syntax/src/parsing/event.rs | |||
@@ -13,14 +13,9 @@ use crate::{ | |||
13 | SmolStr, | 13 | SmolStr, |
14 | SyntaxKind::{self, *}, | 14 | SyntaxKind::{self, *}, |
15 | TextRange, TextUnit, | 15 | TextRange, TextUnit, |
16 | syntax_error::{ | ||
17 | ParseError, | ||
18 | SyntaxError, | ||
19 | SyntaxErrorKind, | ||
20 | }, | ||
21 | parsing::{ | 16 | parsing::{ |
17 | ParseError, TreeSink, | ||
22 | lexer::Token, | 18 | lexer::Token, |
23 | TreeSink, | ||
24 | }, | 19 | }, |
25 | }; | 20 | }; |
26 | 21 | ||
@@ -159,9 +154,7 @@ impl<'a, S: TreeSink> EventProcessor<'a, S> { | |||
159 | .sum::<TextUnit>(); | 154 | .sum::<TextUnit>(); |
160 | self.leaf(kind, len, n_raw_tokens); | 155 | self.leaf(kind, len, n_raw_tokens); |
161 | } | 156 | } |
162 | Event::Error { msg } => self | 157 | Event::Error { msg } => self.sink.error(msg), |
163 | .sink | ||
164 | .error(SyntaxError::new(SyntaxErrorKind::ParseError(msg), self.text_pos)), | ||
165 | } | 158 | } |
166 | } | 159 | } |
167 | self.sink | 160 | self.sink |