1
Fork 0

Simplify conversions between tokens and semantic literals

This commit is contained in:
Vadim Petrochenkov 2019-05-10 03:00:51 +03:00
parent a5b3f33cb9
commit 8739668438
10 changed files with 260 additions and 325 deletions

View file

@ -90,6 +90,13 @@ impl Lit {
}
}
crate fn may_have_suffix(&self) -> bool {
match *self {
Integer(..) | Float(..) => true,
_ => false,
}
}
// See comments in `Nonterminal::to_tokenstream` for why we care about
// *probably* equal here rather than actual equality
fn probably_equal_for_proc_macro(&self, other: &Lit) -> bool {