diff options
Diffstat (limited to 'crates/ra_syntax/src/yellow/mod.rs')
-rw-r--r-- | crates/ra_syntax/src/yellow/mod.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/yellow/mod.rs b/crates/ra_syntax/src/yellow/mod.rs index 650917214..6da948648 100644 --- a/crates/ra_syntax/src/yellow/mod.rs +++ b/crates/ra_syntax/src/yellow/mod.rs | |||
@@ -1,8 +1,9 @@ | |||
1 | mod builder; | 1 | mod builder; |
2 | pub mod syntax_error; | ||
2 | mod syntax_text; | 3 | mod syntax_text; |
3 | 4 | ||
4 | use self::syntax_text::SyntaxText; | 5 | use self::syntax_text::SyntaxText; |
5 | use crate::{SmolStr, SyntaxKind, TextRange, TextUnit}; | 6 | use crate::{SmolStr, SyntaxKind, TextRange}; |
6 | use rowan::Types; | 7 | use rowan::Types; |
7 | use std::{ | 8 | use std::{ |
8 | fmt, | 9 | fmt, |
@@ -10,6 +11,7 @@ use std::{ | |||
10 | }; | 11 | }; |
11 | 12 | ||
12 | pub(crate) use self::builder::GreenBuilder; | 13 | pub(crate) use self::builder::GreenBuilder; |
14 | pub use self::syntax_error::{SyntaxError, SyntaxErrorKind, Location}; | ||
13 | pub use rowan::{TreeRoot, WalkEvent}; | 15 | pub use rowan::{TreeRoot, WalkEvent}; |
14 | 16 | ||
15 | #[derive(Debug, Clone, Copy)] | 17 | #[derive(Debug, Clone, Copy)] |
@@ -24,12 +26,6 @@ pub type RefRoot<'a> = ::rowan::RefRoot<'a, RaTypes>; | |||
24 | 26 | ||
25 | pub type GreenNode = ::rowan::GreenNode<RaTypes>; | 27 | pub type GreenNode = ::rowan::GreenNode<RaTypes>; |
26 | 28 | ||
27 | #[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)] | ||
28 | pub struct SyntaxError { | ||
29 | pub msg: String, | ||
30 | pub offset: TextUnit, | ||
31 | } | ||
32 | |||
33 | #[derive(Clone, Copy)] | 29 | #[derive(Clone, Copy)] |
34 | pub struct SyntaxNode<R: TreeRoot<RaTypes> = OwnedRoot>(::rowan::SyntaxNode<RaTypes, R>); | 30 | pub struct SyntaxNode<R: TreeRoot<RaTypes> = OwnedRoot>(::rowan::SyntaxNode<RaTypes, R>); |
35 | pub type SyntaxNodeRef<'a> = SyntaxNode<RefRoot<'a>>; | 31 | pub type SyntaxNodeRef<'a> = SyntaxNode<RefRoot<'a>>; |