From 0a0e22235b7ad222be1aaa7765b580f4096c9aeb Mon Sep 17 00:00:00 2001 From: Kevin Mehall Date: Sat, 20 Mar 2021 12:18:57 -0600 Subject: Make bare underscore token an Ident rather than Punct in proc-macro --- crates/mbe/src/subtree_source.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/mbe/src/subtree_source.rs') diff --git a/crates/mbe/src/subtree_source.rs b/crates/mbe/src/subtree_source.rs index d7433bd35..a05cab0f3 100644 --- a/crates/mbe/src/subtree_source.rs +++ b/crates/mbe/src/subtree_source.rs @@ -150,6 +150,7 @@ fn convert_ident(ident: &tt::Ident) -> TtToken { let kind = match ident.text.as_ref() { "true" => T![true], "false" => T![false], + "_" => UNDERSCORE, i if i.starts_with('\'') => LIFETIME_IDENT, _ => SyntaxKind::from_keyword(ident.text.as_str()).unwrap_or(IDENT), }; -- cgit v1.2.3