1
Fork 0

Rollup merge of #127806 - nnethercote:parser-improvements, r=spastorino

Some parser improvements

I was looking closely at attribute handling in the parser while debugging some issues relating to #124141, and found a few small improvements.

``@spastorino``
This commit is contained in:
Trevor Gross 2024-07-17 19:53:27 -05:00 committed by GitHub
commit fa1303662a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 92 additions and 122 deletions

View file

@ -699,8 +699,7 @@ impl Token {
false
}
/// Would `maybe_whole_expr` in `parser.rs` return `Ok(..)`?
/// That is, is this a pre-parsed expression dropped into the token stream
/// Is this a pre-parsed expression dropped into the token stream
/// (which happens while parsing the result of macro expansion)?
pub fn is_whole_expr(&self) -> bool {
if let Interpolated(nt) = &self.kind