From fda8ddc5fe8a764c0dc91fecb92af1bdf3078485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20Ochagav=C3=ADa?= Date: Mon, 5 Nov 2018 18:38:34 +0100 Subject: Introduce Location and make SyntaxError fields private --- crates/ra_syntax/src/parser_impl/event.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/parser_impl/event.rs') diff --git a/crates/ra_syntax/src/parser_impl/event.rs b/crates/ra_syntax/src/parser_impl/event.rs index ced09bcff..1445401bc 100644 --- a/crates/ra_syntax/src/parser_impl/event.rs +++ b/crates/ra_syntax/src/parser_impl/event.rs @@ -15,6 +15,7 @@ use crate::{ TextRange, TextUnit, yellow::syntax_error::{ ParseError, + SyntaxError, SyntaxErrorKind, }, }; @@ -162,8 +163,7 @@ impl<'a, S: Sink> EventProcessor<'a, S> { self.leaf(kind, len, n_raw_tokens); } Event::Error { msg } => self.sink.error( - SyntaxErrorKind::ParseError(msg), - TextRange::offset_len(self.text_pos, 1.into()), + SyntaxError::new(SyntaxErrorKind::ParseError(msg), self.text_pos), ), } } -- cgit v1.2.3