aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index 0fbcb2f66..66c1f0337 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -245,8 +245,14 @@ impl Convertor {
245 } 245 }
246 } 246 }
247 NodeOrToken::Node(node) => { 247 NodeOrToken::Node(node) => {
248 let child = self.go(&node)?.into(); 248 let child_subtree = self.go(&node)?;
249 token_trees.push(child); 249 if child_subtree.delimiter == tt::Delimiter::None
250 && node.kind() != SyntaxKind::TOKEN_TREE
251 {
252 token_trees.extend(child_subtree.token_trees);
253 } else {
254 token_trees.push(child_subtree.into());
255 }
250 } 256 }
251 }; 257 };
252 } 258 }