Move TokenCursor::break_last_token
into Parser
.
Similar to the last commit, it's more of a `Parser`-level concern than a `TokenCursor`-level concern. And the struct size reductions are nice. After this change, `TokenCursor` is as minimal as possible (two fields and two methods) which is nice.
This commit is contained in:
parent
54eb6bc34c
commit
6fc2c481e5
3 changed files with 25 additions and 39 deletions
|
@ -1167,7 +1167,7 @@ impl<'a> Parser<'a> {
|
|||
DestructuredFloat::TrailingDot(sym, sym_span, dot_span) => {
|
||||
assert!(suffix.is_none());
|
||||
// Analogous to `Self::break_and_eat`
|
||||
self.token_cursor.break_last_token = true;
|
||||
self.break_last_token = true;
|
||||
// This might work, in cases like `1. 2`, and might not,
|
||||
// in cases like `offset_of!(Ty, 1.)`. It depends on what comes
|
||||
// after the float-like token, and therefore we have to make
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue