mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
rename yellow -> syntax_node
why yellow in the first place? Its red + green.
This commit is contained in:
parent
72a122092b
commit
4e91c23c79
18 changed files with 20 additions and 20 deletions
|
@ -30,7 +30,7 @@ mod syntax_kinds;
|
|||
/// Utilities for simple uses of the parser.
|
||||
pub mod utils;
|
||||
mod validation;
|
||||
mod yellow;
|
||||
mod syntax_node;
|
||||
mod ptr;
|
||||
|
||||
pub use rowan::{SmolStr, TextRange, TextUnit};
|
||||
|
@ -38,12 +38,12 @@ pub use crate::{
|
|||
ast::AstNode,
|
||||
lexer::{tokenize, Token},
|
||||
syntax_kinds::SyntaxKind,
|
||||
yellow::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc},
|
||||
syntax_node::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc},
|
||||
ptr::{SyntaxNodePtr, AstPtr},
|
||||
};
|
||||
|
||||
use ra_text_edit::AtomTextEdit;
|
||||
use crate::yellow::GreenNode;
|
||||
use crate::syntax_node::GreenNode;
|
||||
|
||||
/// `SourceFile` represents a parse tree for a single Rust file.
|
||||
pub use crate::ast::SourceFile;
|
||||
|
@ -61,7 +61,7 @@ impl SourceFile {
|
|||
pub fn parse(text: &str) -> TreeArc<SourceFile> {
|
||||
let tokens = tokenize(&text);
|
||||
let (green, errors) =
|
||||
parser_impl::parse_with(yellow::GreenBuilder::new(), text, &tokens, grammar::root);
|
||||
parser_impl::parse_with(syntax_node::GreenBuilder::new(), text, &tokens, grammar::root);
|
||||
SourceFile::new(green, errors)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue