aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/syntax_bridge.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-18 20:36:37 +0100
committerGitHub <[email protected]>2020-04-18 20:36:37 +0100
commit7a59cd49ff2bb47fa0844fcf5f1ec44f32523b1b (patch)
tree2266a12f833d72faa4c4ba12a997999c7013e975 /crates/ra_mbe/src/syntax_bridge.rs
parentb95b77f92f4ce73b3c9cc652ac9ae40580d308ce (diff)
parenta1b5cf81ebcac15299cc612b49023bb418507027 (diff)
Merge #4035
4035: Convert bool to ident instead of literal in mbe r=matklad a=edwin0cheng Fixed #1249 Currently we treat boolean literal as `tt::Literal` , which makes parsing $lit:lit matcher easily. However, proc-macro2 treat boolean literal as `ident` : https://github.com/alexcrichton/proc-macro2/blob/4173a21dc497c67326095e438ff989cc63cd9279/src/lib.rs#L939 OT: I am quite happy we finally need to fix this bug :) Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src/syntax_bridge.rs')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index 70899bc5d..2b4390eb2 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -376,7 +376,7 @@ trait TokenConvertor {
376 }; 376 };
377 } 377 }
378 let leaf: tt::Leaf = match k { 378 let leaf: tt::Leaf = match k {
379 T![true] | T![false] => make_leaf!(Literal), 379 T![true] | T![false] => make_leaf!(Ident),
380 IDENT => make_leaf!(Ident), 380 IDENT => make_leaf!(Ident),
381 k if k.is_keyword() => make_leaf!(Ident), 381 k if k.is_keyword() => make_leaf!(Ident),
382 k if k.is_literal() => make_leaf!(Literal), 382 k if k.is_literal() => make_leaf!(Literal),