From 1cece9f219016152b2e8bc6194fb7f44a441c6db Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 5 May 2019 11:34:39 +0300 Subject: return errors from tree builder --- crates/ra_syntax/src/syntax_node.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs index e4eab6b87..3a9b3ec2f 100644 --- a/crates/ra_syntax/src/syntax_node.rs +++ b/crates/ra_syntax/src/syntax_node.rs @@ -626,13 +626,13 @@ impl SyntaxTreeBuilder { (green, self.errors) } - pub fn finish(self) -> TreeArc { - let (green, _errors) = self.finish_raw(); + pub fn finish(self) -> (TreeArc, Vec) { + let (green, errors) = self.finish_raw(); let node = SyntaxNode::new(green); if cfg!(debug_assertions) { crate::validation::validate_block_structure(&node); } - node + (node, errors) } pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) { -- cgit v1.2.3