aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/yellow/builder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/yellow/builder.rs')
-rw-r--r--crates/ra_syntax/src/yellow/builder.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/yellow/builder.rs b/crates/ra_syntax/src/yellow/builder.rs
index d64053409..dbe2df125 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}, 3 yellow::{GreenNode, RaTypes, SyntaxError, SyntaxErrorKind},
4 SmolStr, SyntaxKind, TextUnit, 4 SmolStr, SyntaxKind, TextRange,
5}; 5};
6use rowan::GreenNodeBuilder; 6use rowan::GreenNodeBuilder;
7 7
@@ -34,11 +34,8 @@ impl Sink for GreenBuilder {
34 self.inner.finish_internal(); 34 self.inner.finish_internal();
35 } 35 }
36 36
37 fn error(&mut self, message: String, offset: TextUnit) { 37 fn error(&mut self, kind: SyntaxErrorKind, range: TextRange) {
38 let error = SyntaxError { 38 let error = SyntaxError { kind, range };
39 msg: message,
40 offset,
41 };
42 self.errors.push(error) 39 self.errors.push(error)
43 } 40 }
44 41