aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/lib.rs
diff options
context:
space:
mode:
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