summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs')
-rw-r--r--src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs b/src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs
index cbb59ab8e..db0d327bf 100644
--- a/src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs
+++ b/src/tools/rust-analyzer/crates/mbe/src/expander/transcriber.rs
@@ -134,7 +134,13 @@ fn expand_subtree(
let mut err = None;
for op in template.iter() {
match op {
- Op::Leaf(tt) => arena.push(tt.clone().into()),
+ Op::Literal(it) => arena.push(tt::Leaf::from(it.clone()).into()),
+ Op::Ident(it) => arena.push(tt::Leaf::from(it.clone()).into()),
+ Op::Punct(puncts) => {
+ for punct in puncts {
+ arena.push(tt::Leaf::from(punct.clone()).into());
+ }
+ }
Op::Subtree { tokens, delimiter } => {
let ExpandResult { value: tt, err: e } =
expand_subtree(ctx, tokens, *delimiter, arena);