aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/yellow/builder.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/yellow/builder.rs
parent3b42ddae601fbd73f672e82028e04c3abdf1252d (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.rs7
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 @@
1use crate::{ 1use 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};
6use rowan::GreenNodeBuilder; 6use 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