aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_syntax/src/ast.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated.rs.tera2
-rw-r--r--crates/ra_syntax/src/lib.rs8
-rw-r--r--crates/ra_syntax/src/parser_impl.rs2
-rw-r--r--crates/ra_syntax/src/parser_impl/event.rs2
-rw-r--r--crates/ra_syntax/src/reparsing.rs4
-rw-r--r--crates/ra_syntax/src/syntax_node.rs (renamed from crates/ra_syntax/src/yellow.rs)0
-rw-r--r--crates/ra_syntax/src/syntax_node/builder.rs (renamed from crates/ra_syntax/src/yellow/builder.rs)2
-rw-r--r--crates/ra_syntax/src/syntax_node/syntax_error.rs (renamed from crates/ra_syntax/src/yellow/syntax_error.rs)0
-rw-r--r--crates/ra_syntax/src/syntax_node/syntax_text.rs (renamed from crates/ra_syntax/src/yellow/syntax_text.rs)0
-rw-r--r--crates/ra_syntax/src/validation.rs2
-rw-r--r--crates/ra_syntax/src/validation/block.rs2
-rw-r--r--crates/ra_syntax/src/validation/byte.rs2
-rw-r--r--crates/ra_syntax/src/validation/byte_string.rs2
-rw-r--r--crates/ra_syntax/src/validation/char.rs2
-rw-r--r--crates/ra_syntax/src/validation/string.rs2
-rw-r--r--crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs4
18 files changed, 20 insertions, 20 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index cf5cfecc2..22105d6c9 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -6,7 +6,7 @@ use itertools::Itertools;
6 6
7pub use self::generated::*; 7pub use self::generated::*;
8use crate::{ 8use crate::{
9 yellow::{SyntaxNode, SyntaxNodeChildren, TreeArc, RaTypes}, 9 syntax_node::{SyntaxNode, SyntaxNodeChildren, TreeArc, RaTypes},
10 SmolStr, 10 SmolStr,
11 SyntaxKind::*, 11 SyntaxKind::*,
12}; 12};
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index d2b080743..5df3f2ccf 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -13,7 +13,7 @@ use rowan::TransparentNewType;
13 13
14use crate::{ 14use crate::{
15 SyntaxNode, SyntaxKind::*, 15 SyntaxNode, SyntaxKind::*,
16 yellow::{RaTypes, TreeArc}, 16 syntax_node::{RaTypes, TreeArc},
17 ast::{self, AstNode}, 17 ast::{self, AstNode},
18}; 18};
19 19
diff --git a/crates/ra_syntax/src/ast/generated.rs.tera b/crates/ra_syntax/src/ast/generated.rs.tera
index ea0fc35fd..ca7a28581 100644
--- a/crates/ra_syntax/src/ast/generated.rs.tera
+++ b/crates/ra_syntax/src/ast/generated.rs.tera
@@ -15,7 +15,7 @@ use rowan::TransparentNewType;
15 15
16use crate::{ 16use crate::{
17 SyntaxNode, SyntaxKind::*, 17 SyntaxNode, SyntaxKind::*,
18 yellow::{RaTypes, TreeArc}, 18 syntax_node::{RaTypes, TreeArc},
19 ast::{self, AstNode}, 19 ast::{self, AstNode},
20}; 20};
21{% for node, methods in ast %} 21{% for node, methods in ast %}
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index 088b2f5d7..cbba1d4ae 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -30,7 +30,7 @@ mod syntax_kinds;
30/// Utilities for simple uses of the parser. 30/// Utilities for simple uses of the parser.
31pub mod utils; 31pub mod utils;
32mod validation; 32mod validation;
33mod yellow; 33mod syntax_node;
34mod ptr; 34mod ptr;
35 35
36pub use rowan::{SmolStr, TextRange, TextUnit}; 36pub use rowan::{SmolStr, TextRange, TextUnit};
@@ -38,12 +38,12 @@ pub use crate::{
38 ast::AstNode, 38 ast::AstNode,
39 lexer::{tokenize, Token}, 39 lexer::{tokenize, Token},
40 syntax_kinds::SyntaxKind, 40 syntax_kinds::SyntaxKind,
41 yellow::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc}, 41 syntax_node::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc},
42 ptr::{SyntaxNodePtr, AstPtr}, 42 ptr::{SyntaxNodePtr, AstPtr},
43}; 43};
44 44
45use ra_text_edit::AtomTextEdit; 45use ra_text_edit::AtomTextEdit;
46use crate::yellow::GreenNode; 46use crate::syntax_node::GreenNode;
47 47
48/// `SourceFile` represents a parse tree for a single Rust file. 48/// `SourceFile` represents a parse tree for a single Rust file.
49pub use crate::ast::SourceFile; 49pub use crate::ast::SourceFile;
@@ -61,7 +61,7 @@ impl SourceFile {
61 pub fn parse(text: &str) -> TreeArc<SourceFile> { 61 pub fn parse(text: &str) -> TreeArc<SourceFile> {
62 let tokens = tokenize(&text); 62 let tokens = tokenize(&text);
63 let (green, errors) = 63 let (green, errors) =
64 parser_impl::parse_with(yellow::GreenBuilder::new(), text, &tokens, grammar::root); 64 parser_impl::parse_with(syntax_node::GreenBuilder::new(), text, &tokens, grammar::root);
65 SourceFile::new(green, errors) 65 SourceFile::new(green, errors)
66 } 66 }
67 67
diff --git a/crates/ra_syntax/src/parser_impl.rs b/crates/ra_syntax/src/parser_impl.rs
index f255dc23b..d99615d72 100644
--- a/crates/ra_syntax/src/parser_impl.rs
+++ b/crates/ra_syntax/src/parser_impl.rs
@@ -11,7 +11,7 @@ use crate::{
11 input::{InputPosition, ParserInput}, 11 input::{InputPosition, ParserInput},
12 }, 12 },
13 SmolStr, 13 SmolStr,
14 yellow::syntax_error::{ 14 syntax_node::syntax_error::{
15 ParseError, 15 ParseError,
16 SyntaxError, 16 SyntaxError,
17 }, 17 },
diff --git a/crates/ra_syntax/src/parser_impl/event.rs b/crates/ra_syntax/src/parser_impl/event.rs
index 677876ab5..b45830c61 100644
--- a/crates/ra_syntax/src/parser_impl/event.rs
+++ b/crates/ra_syntax/src/parser_impl/event.rs
@@ -13,7 +13,7 @@ use crate::{
13 SmolStr, 13 SmolStr,
14 SyntaxKind::{self, *}, 14 SyntaxKind::{self, *},
15 TextRange, TextUnit, 15 TextRange, TextUnit,
16 yellow::syntax_error::{ 16 syntax_node::syntax_error::{
17 ParseError, 17 ParseError,
18 SyntaxError, 18 SyntaxError,
19 SyntaxErrorKind, 19 SyntaxErrorKind,
diff --git a/crates/ra_syntax/src/reparsing.rs b/crates/ra_syntax/src/reparsing.rs
index c5c609ad5..dd751465c 100644
--- a/crates/ra_syntax/src/reparsing.rs
+++ b/crates/ra_syntax/src/reparsing.rs
@@ -3,7 +3,7 @@ use crate::grammar;
3use crate::lexer::{tokenize, Token}; 3use crate::lexer::{tokenize, Token};
4use crate::parser_api::Parser; 4use crate::parser_api::Parser;
5use crate::parser_impl; 5use crate::parser_impl;
6use crate::yellow::{self, GreenNode, SyntaxError, SyntaxNode}; 6use crate::syntax_node::{self, GreenNode, SyntaxError, SyntaxNode};
7use crate::{SyntaxKind::*, TextRange, TextUnit}; 7use crate::{SyntaxKind::*, TextRange, TextUnit};
8use ra_text_edit::AtomTextEdit; 8use ra_text_edit::AtomTextEdit;
9 9
@@ -56,7 +56,7 @@ fn reparse_block<'node>(
56 return None; 56 return None;
57 } 57 }
58 let (green, new_errors) = 58 let (green, new_errors) =
59 parser_impl::parse_with(yellow::GreenBuilder::new(), &text, &tokens, reparser); 59 parser_impl::parse_with(syntax_node::GreenBuilder::new(), &text, &tokens, reparser);
60 Some((node, green, new_errors)) 60 Some((node, green, new_errors))
61} 61}
62 62
diff --git a/crates/ra_syntax/src/yellow.rs b/crates/ra_syntax/src/syntax_node.rs
index ed48739f8..ed48739f8 100644
--- a/crates/ra_syntax/src/yellow.rs
+++ b/crates/ra_syntax/src/syntax_node.rs
diff --git a/crates/ra_syntax/src/yellow/builder.rs b/crates/ra_syntax/src/syntax_node/builder.rs
index e8b9112d4..8abd0f051 100644
--- a/crates/ra_syntax/src/yellow/builder.rs
+++ b/crates/ra_syntax/src/syntax_node/builder.rs
@@ -1,6 +1,6 @@
1use crate::{ 1use crate::{
2 parser_impl::Sink, 2 parser_impl::Sink,
3 yellow::{GreenNode, RaTypes, SyntaxError}, 3 syntax_node::{GreenNode, RaTypes, SyntaxError},
4 SmolStr, SyntaxKind, 4 SmolStr, SyntaxKind,
5}; 5};
6use rowan::GreenNodeBuilder; 6use rowan::GreenNodeBuilder;
diff --git a/crates/ra_syntax/src/yellow/syntax_error.rs b/crates/ra_syntax/src/syntax_node/syntax_error.rs
index 412cf82cc..412cf82cc 100644
--- a/crates/ra_syntax/src/yellow/syntax_error.rs
+++ b/crates/ra_syntax/src/syntax_node/syntax_error.rs
diff --git a/crates/ra_syntax/src/yellow/syntax_text.rs b/crates/ra_syntax/src/syntax_node/syntax_text.rs
index 84e5b231a..84e5b231a 100644
--- a/crates/ra_syntax/src/yellow/syntax_text.rs
+++ b/crates/ra_syntax/src/syntax_node/syntax_text.rs
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index ac6cc3dd6..10672d6bf 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -5,7 +5,7 @@ mod string;
5mod block; 5mod block;
6 6
7use crate::{ 7use crate::{
8 SourceFile, yellow::SyntaxError, AstNode, 8 SourceFile, syntax_node::SyntaxError, AstNode,
9 ast, 9 ast,
10 algo::visit::{visitor_ctx, VisitorCtx}, 10 algo::visit::{visitor_ctx, VisitorCtx},
11}; 11};
diff --git a/crates/ra_syntax/src/validation/block.rs b/crates/ra_syntax/src/validation/block.rs
index 4e77c15b6..de949d967 100644
--- a/crates/ra_syntax/src/validation/block.rs
+++ b/crates/ra_syntax/src/validation/block.rs
@@ -1,6 +1,6 @@
1use crate::{SyntaxKind::*, 1use crate::{SyntaxKind::*,
2 ast::{self, AttrsOwner, AstNode}, 2 ast::{self, AttrsOwner, AstNode},
3 yellow::{ 3 syntax_node::{
4 SyntaxError, 4 SyntaxError,
5 SyntaxErrorKind::*, 5 SyntaxErrorKind::*,
6 }, 6 },
diff --git a/crates/ra_syntax/src/validation/byte.rs b/crates/ra_syntax/src/validation/byte.rs
index d51fabcf9..acdc12552 100644
--- a/crates/ra_syntax/src/validation/byte.rs
+++ b/crates/ra_syntax/src/validation/byte.rs
@@ -5,7 +5,7 @@ use crate::{
5 string_lexing::{self, StringComponentKind}, 5 string_lexing::{self, StringComponentKind},
6 TextRange, 6 TextRange,
7 validation::char, 7 validation::char,
8 yellow::{ 8 syntax_node::{
9 SyntaxError, 9 SyntaxError,
10 SyntaxErrorKind::*, 10 SyntaxErrorKind::*,
11 }, 11 },
diff --git a/crates/ra_syntax/src/validation/byte_string.rs b/crates/ra_syntax/src/validation/byte_string.rs
index 7abe8f330..69a98b640 100644
--- a/crates/ra_syntax/src/validation/byte_string.rs
+++ b/crates/ra_syntax/src/validation/byte_string.rs
@@ -1,7 +1,7 @@
1use crate::{ 1use crate::{
2 ast::{self, AstNode, AstToken}, 2 ast::{self, AstNode, AstToken},
3 string_lexing::{self, StringComponentKind}, 3 string_lexing::{self, StringComponentKind},
4 yellow::{ 4 syntax_node::{
5 SyntaxError, 5 SyntaxError,
6 SyntaxErrorKind::*, 6 SyntaxErrorKind::*,
7 }, 7 },
diff --git a/crates/ra_syntax/src/validation/char.rs b/crates/ra_syntax/src/validation/char.rs
index 012594db3..26c15e36d 100644
--- a/crates/ra_syntax/src/validation/char.rs
+++ b/crates/ra_syntax/src/validation/char.rs
@@ -8,7 +8,7 @@ use crate::{
8 ast::{self, AstNode, AstToken}, 8 ast::{self, AstNode, AstToken},
9 string_lexing::{self, StringComponentKind}, 9 string_lexing::{self, StringComponentKind},
10 TextRange, 10 TextRange,
11 yellow::{ 11 syntax_node::{
12 SyntaxError, 12 SyntaxError,
13 SyntaxErrorKind::*, 13 SyntaxErrorKind::*,
14 }, 14 },
diff --git a/crates/ra_syntax/src/validation/string.rs b/crates/ra_syntax/src/validation/string.rs
index 4fd7fffdf..2f7f9c7c4 100644
--- a/crates/ra_syntax/src/validation/string.rs
+++ b/crates/ra_syntax/src/validation/string.rs
@@ -1,7 +1,7 @@
1use crate::{ 1use crate::{
2 ast::{self, AstNode, AstToken}, 2 ast::{self, AstNode, AstToken},
3 string_lexing, 3 string_lexing,
4 yellow::{ 4 syntax_node::{
5 SyntaxError, 5 SyntaxError,
6 SyntaxErrorKind::*, 6 SyntaxErrorKind::*,
7 }, 7 },
diff --git a/crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs b/crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs
index 59cd11495..e0437d163 100644
--- a/crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs
+++ b/crates/ra_syntax/tests/data/parser/fuzz-failures/0000.rs
@@ -5,7 +5,7 @@
5 } 5 }
6 pub fn parse(text: &str) -> File { 6 pub fn parse(text: &str) -> File {
7 let tokens = tokenize(&text); 7 let tokens = tokenize(&text);
8 let (green, errors) = parser_impl::parse_with::<yellow::GreenBuilder>( 8 let (green, errors) = parser_impl::parse_with::<syntax_node::GreenBuilder>(
9 text, &tokens, grammar::root, 9 text, &tokens, grammar::root,
10 ); 10 );
11 File::new(green, errors) 11 File::new(green, errors)
@@ -24,7 +24,7 @@
24 if !is_balanced(&tokens) { 24 if !is_balanced(&tokens) {
25 return None; 25 return None;
26 } 26 }
27 let (green, new_errors) = parser_impl::parse_with::<yellow::GreenBuilder>( 27 let (green, new_errors) = parser_impl::parse_with::<syntax_node::GreenBuilder>(
28 &te2t, &tokens, reparser, 28 &te2t, &tokens, reparser,
29 ); 29 );
30 let green_root = node.replace_with(green); 30 let green_root = node.replace_with(green);