diff options
author | Aleksey Kladov <[email protected]> | 2019-05-05 09:34:39 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-05-28 14:26:14 +0100 |
commit | 1cece9f219016152b2e8bc6194fb7f44a441c6db (patch) | |
tree | 8012db3e26498105f94c808cb69958054dd0a2b7 /crates/ra_syntax | |
parent | 90926b9479a0403f7a5d8a94af876d88d42a8237 (diff) |
return errors from tree builder
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/src/syntax_node.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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 { | |||
626 | (green, self.errors) | 626 | (green, self.errors) |
627 | } | 627 | } |
628 | 628 | ||
629 | pub fn finish(self) -> TreeArc<SyntaxNode> { | 629 | pub fn finish(self) -> (TreeArc<SyntaxNode>, Vec<SyntaxError>) { |
630 | let (green, _errors) = self.finish_raw(); | 630 | let (green, errors) = self.finish_raw(); |
631 | let node = SyntaxNode::new(green); | 631 | let node = SyntaxNode::new(green); |
632 | if cfg!(debug_assertions) { | 632 | if cfg!(debug_assertions) { |
633 | crate::validation::validate_block_structure(&node); | 633 | crate::validation::validate_block_structure(&node); |
634 | } | 634 | } |
635 | node | 635 | (node, errors) |
636 | } | 636 | } |
637 | 637 | ||
638 | pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) { | 638 | pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) { |