aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/syntax_node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/syntax_node.rs')
-rw-r--r--crates/ra_syntax/src/syntax_node.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs
index 7c2b18af3..4e3a1460d 100644
--- a/crates/ra_syntax/src/syntax_node.rs
+++ b/crates/ra_syntax/src/syntax_node.rs
@@ -6,13 +6,9 @@
6//! The *real* implementation is in the (language-agnostic) `rowan` crate, this 6//! The *real* implementation is in the (language-agnostic) `rowan` crate, this
7//! module just wraps its API. 7//! module just wraps its API.
8 8
9use ra_parser::ParseError;
10use rowan::{GreenNodeBuilder, Language}; 9use rowan::{GreenNodeBuilder, Language};
11 10
12use crate::{ 11use crate::{Parse, SmolStr, SyntaxError, SyntaxKind, TextUnit};
13 syntax_error::{SyntaxError, SyntaxErrorKind},
14 Parse, SmolStr, SyntaxKind, TextUnit,
15};
16 12
17pub(crate) use rowan::{GreenNode, GreenToken}; 13pub(crate) use rowan::{GreenNode, GreenToken};
18 14
@@ -73,8 +69,7 @@ impl SyntaxTreeBuilder {
73 self.inner.finish_node() 69 self.inner.finish_node()
74 } 70 }
75 71
76 pub fn error(&mut self, error: ParseError, text_pos: TextUnit) { 72 pub fn error(&mut self, error: ra_parser::ParseError, text_pos: TextUnit) {
77 let error = SyntaxError::new(SyntaxErrorKind::ParseError(error), text_pos); 73 self.errors.push(SyntaxError::new_at_offset(error.0, text_pos))
78 self.errors.push(error)
79 } 74 }
80} 75}