diff options
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 5 | ||||
-rw-r--r-- | crates/ra_syntax/src/syntax_node.rs | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs index c0a3fec35..4639baa38 100644 --- a/crates/ra_mbe/src/syntax_bridge.rs +++ b/crates/ra_mbe/src/syntax_bridge.rs | |||
@@ -56,8 +56,9 @@ where | |||
56 | if tree_sink.roots.len() != 1 { | 56 | if tree_sink.roots.len() != 1 { |
57 | return Err(ExpandError::ConversionError); | 57 | return Err(ExpandError::ConversionError); |
58 | } | 58 | } |
59 | 59 | //FIXME: would be cool to report errors | |
60 | Ok(tree_sink.inner.finish()) | 60 | let (tree, _errors) = tree_sink.inner.finish(); |
61 | Ok(tree) | ||
61 | } | 62 | } |
62 | 63 | ||
63 | /// Parses the token tree (result of macro expansion) to an expression | 64 | /// Parses the token tree (result of macro expansion) to an expression |
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) { |