aboutsummaryrefslogtreecommitdiff
path: root/src/yellow
diff options
context:
space:
mode:
Diffstat (limited to 'src/yellow')
-rw-r--r--src/yellow/green.rs7
-rw-r--r--src/yellow/mod.rs1
-rw-r--r--src/yellow/red.rs4
-rw-r--r--src/yellow/syntax.rs1
4 files changed, 2 insertions, 11 deletions
diff --git a/src/yellow/green.rs b/src/yellow/green.rs
index ede23b719..dafe1bb22 100644
--- a/src/yellow/green.rs
+++ b/src/yellow/green.rs
@@ -116,13 +116,6 @@ impl GreenNode {
116 GreenNodeData::Branch(_) => false 116 GreenNodeData::Branch(_) => false
117 } 117 }
118 } 118 }
119
120 pub(crate) fn leaf_text(&self) -> &str {
121 match &self.data {
122 GreenNodeData::Leaf(l) => l.text.as_str(),
123 GreenNodeData::Branch(_) => panic!("not a leaf")
124 }
125 }
126} 119}
127 120
128#[derive(Debug)] 121#[derive(Debug)]
diff --git a/src/yellow/mod.rs b/src/yellow/mod.rs
index 236328a7f..88d88e226 100644
--- a/src/yellow/mod.rs
+++ b/src/yellow/mod.rs
@@ -4,7 +4,6 @@ mod syntax;
4 4
5use std::{ 5use std::{
6 sync::{Arc, Weak}, 6 sync::{Arc, Weak},
7 ops::Deref,
8 mem 7 mem
9}; 8};
10pub(crate) use self::{ 9pub(crate) use self::{
diff --git a/src/yellow/red.rs b/src/yellow/red.rs
index feba99faa..71212a081 100644
--- a/src/yellow/red.rs
+++ b/src/yellow/red.rs
@@ -1,6 +1,6 @@
1use std::sync::{Arc, Weak, RwLock}; 1use std::sync::{Arc, RwLock};
2use { 2use {
3 TextUnit, SyntaxKind, TextRange, 3 TextUnit,
4 yellow::{Ptr, GreenNode, TextLen} 4 yellow::{Ptr, GreenNode, TextLen}
5}; 5};
6 6
diff --git a/src/yellow/syntax.rs b/src/yellow/syntax.rs
index 0c9ffeb14..7b1a05cd9 100644
--- a/src/yellow/syntax.rs
+++ b/src/yellow/syntax.rs
@@ -7,7 +7,6 @@ use {
7 TextRange, TextUnit, SyntaxKind, 7 TextRange, TextUnit, SyntaxKind,
8 yellow::{Ptr, RedNode, GreenNode, TextLen}, 8 yellow::{Ptr, RedNode, GreenNode, TextLen},
9}; 9};
10use yellow::green::GreenTrivia;
11 10
12#[derive(Clone)] 11#[derive(Clone)]
13pub struct SyntaxNode { 12pub struct SyntaxNode {