aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parser_impl/event.rs
diff options
context:
space:
mode:
authorAdolfo OchagavĂ­a <[email protected]>2018-11-05 17:38:34 +0000
committerAdolfo OchagavĂ­a <[email protected]>2018-11-05 17:38:34 +0000
commitfda8ddc5fe8a764c0dc91fecb92af1bdf3078485 (patch)
tree1de03cfa42f40bb5ca19956534f53d0b92d271d5 /crates/ra_syntax/src/parser_impl/event.rs
parent3b42ddae601fbd73f672e82028e04c3abdf1252d (diff)
Introduce Location and make SyntaxError fields private
Diffstat (limited to 'crates/ra_syntax/src/parser_impl/event.rs')
-rw-r--r--crates/ra_syntax/src/parser_impl/event.rs4
1 files changed, 2 insertions, 2 deletions
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::{
15 TextRange, TextUnit, 15 TextRange, TextUnit,
16 yellow::syntax_error::{ 16 yellow::syntax_error::{
17 ParseError, 17 ParseError,
18 SyntaxError,
18 SyntaxErrorKind, 19 SyntaxErrorKind,
19 }, 20 },
20}; 21};
@@ -162,8 +163,7 @@ impl<'a, S: Sink> EventProcessor<'a, S> {
162 self.leaf(kind, len, n_raw_tokens); 163 self.leaf(kind, len, n_raw_tokens);
163 } 164 }
164 Event::Error { msg } => self.sink.error( 165 Event::Error { msg } => self.sink.error(
165 SyntaxErrorKind::ParseError(msg), 166 SyntaxError::new(SyntaxErrorKind::ParseError(msg), self.text_pos),
166 TextRange::offset_len(self.text_pos, 1.into()),
167 ), 167 ),
168 } 168 }
169 } 169 }