From 882c47f1870f15cb2aaad8871ccbad1c51520f49 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Feb 2019 23:17:07 +0300 Subject: move syntax error to parser --- crates/ra_syntax/src/parsing/event.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'crates/ra_syntax/src/parsing/event.rs') 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::{ SmolStr, SyntaxKind::{self, *}, TextRange, TextUnit, - syntax_error::{ - ParseError, - SyntaxError, - SyntaxErrorKind, - }, parsing::{ + ParseError, TreeSink, lexer::Token, - TreeSink, }, }; @@ -159,9 +154,7 @@ impl<'a, S: TreeSink> EventProcessor<'a, S> { .sum::(); self.leaf(kind, len, n_raw_tokens); } - Event::Error { msg } => self - .sink - .error(SyntaxError::new(SyntaxErrorKind::ParseError(msg), self.text_pos)), + Event::Error { msg } => self.sink.error(msg), } } self.sink -- cgit v1.2.3