Simplify conversions between tokens and semantic literals
This commit is contained in:
parent
a5b3f33cb9
commit
8739668438
10 changed files with 260 additions and 325 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue