aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-12 15:41:57 +0000
committerAleksey Kladov <[email protected]>2019-02-12 16:02:30 +0000
commit4e91c23c796988e3934afabf619185333f85c116 (patch)
treef81bff262a32170f2677c5c60fe6ddba766f042a /crates/ra_syntax/src/lib.rs
parent72a122092bb37249a5d04ca3b8b5c8b78f9b84dd (diff)
rename yellow -> syntax_node
why yellow in the first place? Its red + green.
Diffstat (limited to 'crates/ra_syntax/src/lib.rs')
-rw-r--r--crates/ra_syntax/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
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