Skip to content

Commit afdcfb7

Browse files
bors[bot]matklad
andcommitted
Merge #808
808: rename yellow -> syntax_node r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents abc5d37 + 4e91c23 commit afdcfb7

File tree

18 files changed

+20
-20
lines changed

18 files changed

+20
-20
lines changed

crates/ra_syntax/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use itertools::Itertools;
66

77
pub use self::generated::*;
88
use crate::{
9-
yellow::{SyntaxNode, SyntaxNodeChildren, TreeArc, RaTypes},
9+
syntax_node::{SyntaxNode, SyntaxNodeChildren, TreeArc, RaTypes},
1010
SmolStr,
1111
SyntaxKind::*,
1212
};

crates/ra_syntax/src/ast/generated.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rowan::TransparentNewType;
1313

1414
use crate::{
1515
SyntaxNode, SyntaxKind::*,
16-
yellow::{RaTypes, TreeArc},
16+
syntax_node::{RaTypes, TreeArc},
1717
ast::{self, AstNode},
1818
};
1919

crates/ra_syntax/src/ast/generated.rs.tera

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rowan::TransparentNewType;
1515

1616
use crate::{
1717
SyntaxNode, SyntaxKind::*,
18-
yellow::{RaTypes, TreeArc},
18+
syntax_node::{RaTypes, TreeArc},
1919
ast::{self, AstNode},
2020
};
2121
{% for node, methods in ast %}

crates/ra_syntax/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ mod syntax_kinds;
3030
/// Utilities for simple uses of the parser.
3131
pub mod utils;
3232
mod validation;
33-
mod yellow;
33+
mod syntax_node;
3434
mod ptr;
3535

3636
pub use rowan::{SmolStr, TextRange, TextUnit};
3737
pub use crate::{
3838
ast::AstNode,
3939
lexer::{tokenize, Token},
4040
syntax_kinds::SyntaxKind,
41-
yellow::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc},
41+
syntax_node::{Direction, SyntaxError, SyntaxNode, WalkEvent, Location, TreeArc},
4242
ptr::{SyntaxNodePtr, AstPtr},
4343
};
4444

4545
use ra_text_edit::AtomTextEdit;
46-
use crate::yellow::GreenNode;
46+
use crate::syntax_node::GreenNode;
4747

4848
/// `SourceFile` represents a parse tree for a single Rust file.
4949
pub use crate::ast::SourceFile;
@@ -61,7 +61,7 @@ impl SourceFile {
6161
pub fn parse(text: &str) -> TreeArc<SourceFile> {
6262
let tokens = tokenize(&text);
6363
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);
6565
SourceFile::new(green, errors)
6666
}
6767

crates/ra_syntax/src/parser_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
input::{InputPosition, ParserInput},
1212
},
1313
SmolStr,
14-
yellow::syntax_error::{
14+
syntax_node::syntax_error::{
1515
ParseError,
1616
SyntaxError,
1717
},

crates/ra_syntax/src/parser_impl/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
SmolStr,
1414
SyntaxKind::{self, *},
1515
TextRange, TextUnit,
16-
yellow::syntax_error::{
16+
syntax_node::syntax_error::{
1717
ParseError,
1818
SyntaxError,
1919
SyntaxErrorKind,

crates/ra_syntax/src/reparsing.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::grammar;
33
use crate::lexer::{tokenize, Token};
44
use crate::parser_api::Parser;
55
use crate::parser_impl;
6-
use crate::yellow::{self, GreenNode, SyntaxError, SyntaxNode};
6+
use crate::syntax_node::{self, GreenNode, SyntaxError, SyntaxNode};
77
use crate::{SyntaxKind::*, TextRange, TextUnit};
88
use ra_text_edit::AtomTextEdit;
99

@@ -56,7 +56,7 @@ fn reparse_block<'node>(
5656
return None;
5757
}
5858
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);
6060
Some((node, green, new_errors))
6161
}
6262

File renamed without changes.

crates/ra_syntax/src/yellow/builder.rs renamed to crates/ra_syntax/src/syntax_node/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::{
22
parser_impl::Sink,
3-
yellow::{GreenNode, RaTypes, SyntaxError},
3+
syntax_node::{GreenNode, RaTypes, SyntaxError},
44
SmolStr, SyntaxKind,
55
};
66
use rowan::GreenNodeBuilder;

0 commit comments

Comments
 (0)