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