aboutsummaryrefslogtreecommitdiff
path: root/src/yellow
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-09 19:27:44 +0100
committerAleksey Kladov <[email protected]>2018-08-09 19:27:44 +0100
commit4a900fd6815d3ea722b5e664aee9eac8bb9cb14f (patch)
tree48dddd52ed4ed5e9cf28504d2c3b8d8a1dd8c27e /src/yellow
parentafa94d4f37b9a0a1e723edffcc79c3d48799bad1 (diff)
Split diagnostics
Diffstat (limited to 'src/yellow')
-rw-r--r--src/yellow/builder.rs2
-rw-r--r--src/yellow/mod.rs3
-rw-r--r--src/yellow/syntax.rs6
3 files changed, 5 insertions, 6 deletions
diff --git a/src/yellow/builder.rs b/src/yellow/builder.rs
index 878f3ba39..5e94e5055 100644
--- a/src/yellow/builder.rs
+++ b/src/yellow/builder.rs
@@ -51,7 +51,7 @@ impl<'a> Sink<'a> for GreenBuilder<'a> {
51 51
52 fn error(&mut self, message: String) { 52 fn error(&mut self, message: String) {
53 self.errors.push(SyntaxError { 53 self.errors.push(SyntaxError {
54 message, 54 msg: message,
55 offset: self.pos, 55 offset: self.pos,
56 }) 56 })
57 } 57 }
diff --git a/src/yellow/mod.rs b/src/yellow/mod.rs
index 1b5d4e4df..6129ecb99 100644
--- a/src/yellow/mod.rs
+++ b/src/yellow/mod.rs
@@ -3,10 +3,9 @@ mod green;
3mod red; 3mod red;
4mod syntax; 4mod syntax;
5 5
6pub use self::syntax::{SyntaxNode, SyntaxNodeRef, SyntaxRoot, TreeRoot}; 6pub use self::syntax::{SyntaxNode, SyntaxNodeRef, SyntaxRoot, TreeRoot, SyntaxError};
7pub(crate) use self::{ 7pub(crate) use self::{
8 builder::GreenBuilder, 8 builder::GreenBuilder,
9 green::GreenNode, 9 green::GreenNode,
10 red::RedNode, 10 red::RedNode,
11 syntax::SyntaxError,
12}; 11};
diff --git a/src/yellow/syntax.rs b/src/yellow/syntax.rs
index 07607ec2d..2ba9281fc 100644
--- a/src/yellow/syntax.rs
+++ b/src/yellow/syntax.rs
@@ -46,9 +46,9 @@ impl SyntaxRoot {
46} 46}
47 47
48#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)] 48#[derive(Debug, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)]
49pub(crate) struct SyntaxError { 49pub struct SyntaxError {
50 pub(crate) message: String, 50 pub msg: String,
51 pub(crate) offset: TextUnit, 51 pub offset: TextUnit,
52} 52}
53 53
54impl SyntaxNode<Arc<SyntaxRoot>> { 54impl SyntaxNode<Arc<SyntaxRoot>> {