diff options
author | Adolfo OchagavĂa <[email protected]> | 2018-11-05 17:38:34 +0000 |
---|---|---|
committer | Adolfo OchagavĂa <[email protected]> | 2018-11-05 17:38:34 +0000 |
commit | fda8ddc5fe8a764c0dc91fecb92af1bdf3078485 (patch) | |
tree | 1de03cfa42f40bb5ca19956534f53d0b92d271d5 /crates/ra_syntax/src/yellow/builder.rs | |
parent | 3b42ddae601fbd73f672e82028e04c3abdf1252d (diff) |
Introduce Location and make SyntaxError fields private
Diffstat (limited to 'crates/ra_syntax/src/yellow/builder.rs')
-rw-r--r-- | crates/ra_syntax/src/yellow/builder.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/yellow/builder.rs b/crates/ra_syntax/src/yellow/builder.rs index dbe2df125..9fcebfb93 100644 --- a/crates/ra_syntax/src/yellow/builder.rs +++ b/crates/ra_syntax/src/yellow/builder.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | parser_impl::Sink, | 2 | parser_impl::Sink, |
3 | yellow::{GreenNode, RaTypes, SyntaxError, SyntaxErrorKind}, | 3 | yellow::{GreenNode, RaTypes, SyntaxError}, |
4 | SmolStr, SyntaxKind, TextRange, | 4 | SmolStr, SyntaxKind, |
5 | }; | 5 | }; |
6 | use rowan::GreenNodeBuilder; | 6 | use rowan::GreenNodeBuilder; |
7 | 7 | ||
@@ -34,8 +34,7 @@ impl Sink for GreenBuilder { | |||
34 | self.inner.finish_internal(); | 34 | self.inner.finish_internal(); |
35 | } | 35 | } |
36 | 36 | ||
37 | fn error(&mut self, kind: SyntaxErrorKind, range: TextRange) { | 37 | fn error(&mut self, error: SyntaxError) { |
38 | let error = SyntaxError { kind, range }; | ||
39 | self.errors.push(error) | 38 | self.errors.push(error) |
40 | } | 39 | } |
41 | 40 | ||