aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/mbe_expander/transcriber.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-18 11:47:50 +0000
committerGitHub <[email protected]>2019-12-18 11:47:50 +0000
commit242f0ae1d8e6766091a6050431c3d417a43a2a3e (patch)
treeb45d7619b97cc6edaf6bcf7d1a42366879bdd703 /crates/ra_mbe/src/mbe_expander/transcriber.rs
parent46ca40ccfced6945e05a25979a2703ad967d2fe0 (diff)
parent41544a40883874553f570e2999bf56d172bd6246 (diff)
Merge #2545
2545: Add Token id to all tt::TokenTree r=matklad a=edwin0cheng This PR try to add token id to all `tt::Leaf` and `tt::Delimiter`. ~~Some tests are failed now because of #2544~~ ~~Still blocked by a test in goto-definition : see https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553~~ Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander/transcriber.rs')
-rw-r--r--crates/ra_mbe/src/mbe_expander/transcriber.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/mbe_expander/transcriber.rs b/crates/ra_mbe/src/mbe_expander/transcriber.rs
index f7636db11..eda66cd50 100644
--- a/crates/ra_mbe/src/mbe_expander/transcriber.rs
+++ b/crates/ra_mbe/src/mbe_expander/transcriber.rs
@@ -108,7 +108,12 @@ fn expand_var(ctx: &mut ExpandCtx, v: &SmolStr) -> Result<Fragment, ExpandError>
108 let tt = tt::Subtree { 108 let tt = tt::Subtree {
109 delimiter: None, 109 delimiter: None,
110 token_trees: vec![ 110 token_trees: vec![
111 tt::Leaf::from(tt::Punct { char: '$', spacing: tt::Spacing::Alone }).into(), 111 tt::Leaf::from(tt::Punct {
112 char: '$',
113 spacing: tt::Spacing::Alone,
114 id: tt::TokenId::unspecified(),
115 })
116 .into(),
112 tt::Leaf::from(tt::Ident { text: v.clone(), id: tt::TokenId::unspecified() }) 117 tt::Leaf::from(tt::Ident { text: v.clone(), id: tt::TokenId::unspecified() })
113 .into(), 118 .into(),
114 ], 119 ],