aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/syntax_node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/syntax_node.rs')
-rw-r--r--crates/ra_syntax/src/syntax_node.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs
index a1f9a59b6..e57813a94 100644
--- a/crates/ra_syntax/src/syntax_node.rs
+++ b/crates/ra_syntax/src/syntax_node.rs
@@ -18,7 +18,8 @@ use rowan::{GreenNodeBuilder, TransparentNewType};
18 18
19use crate::{ 19use crate::{
20 syntax_error::{SyntaxError, SyntaxErrorKind}, 20 syntax_error::{SyntaxError, SyntaxErrorKind},
21 AstNode, SmolStr, SourceFile, SyntaxKind, SyntaxNodePtr, SyntaxText, TextRange, TextUnit, 21 AstNode, Parse, SmolStr, SourceFile, SyntaxKind, SyntaxNodePtr, SyntaxText, TextRange,
22 TextUnit,
22}; 23};
23 24
24pub use rowan::WalkEvent; 25pub use rowan::WalkEvent;
@@ -594,13 +595,13 @@ impl SyntaxTreeBuilder {
594 (green, self.errors) 595 (green, self.errors)
595 } 596 }
596 597
597 pub fn finish(self) -> (TreeArc<SyntaxNode>, Vec<SyntaxError>) { 598 pub fn finish(self) -> Parse<SyntaxNode> {
598 let (green, errors) = self.finish_raw(); 599 let (green, errors) = self.finish_raw();
599 let node = SyntaxNode::new(green); 600 let node = SyntaxNode::new(green);
600 if cfg!(debug_assertions) { 601 if cfg!(debug_assertions) {
601 crate::validation::validate_block_structure(&node); 602 crate::validation::validate_block_structure(&node);
602 } 603 }
603 (node, errors) 604 Parse::new(node, errors)
604 } 605 }
605 606
606 pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) { 607 pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) {