Fix some formatting.
This commit is contained in:
parent
095722214d
commit
c14d9ae23e
@ -66,8 +66,7 @@ fn may_be_ident(nt: &token::Nonterminal) -> bool {
|
|||||||
token::Interpolated(nt) => may_be_ident(&nt.0),
|
token::Interpolated(nt) => may_be_ident(&nt.0),
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
NonterminalKind::PatParam { .. } | NonterminalKind::PatWithOr => {
|
NonterminalKind::PatParam { .. } | NonterminalKind::PatWithOr => match &token.kind {
|
||||||
match &token.kind {
|
|
||||||
token::Ident(..) | // box, ref, mut, and other identifiers (can stricten)
|
token::Ident(..) | // box, ref, mut, and other identifiers (can stricten)
|
||||||
token::OpenDelim(Delimiter::Parenthesis) | // tuple pattern
|
token::OpenDelim(Delimiter::Parenthesis) | // tuple pattern
|
||||||
token::OpenDelim(Delimiter::Bracket) | // slice pattern
|
token::OpenDelim(Delimiter::Bracket) | // slice pattern
|
||||||
@ -84,8 +83,7 @@ fn may_be_ident(nt: &token::Nonterminal) -> bool {
|
|||||||
token::BinOp(token::Or) => matches!(kind, NonterminalKind::PatWithOr),
|
token::BinOp(token::Or) => matches!(kind, NonterminalKind::PatWithOr),
|
||||||
token::Interpolated(nt) => may_be_ident(&nt.0),
|
token::Interpolated(nt) => may_be_ident(&nt.0),
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
},
|
||||||
}
|
|
||||||
NonterminalKind::Lifetime => match &token.kind {
|
NonterminalKind::Lifetime => match &token.kind {
|
||||||
token::Lifetime(_) => true,
|
token::Lifetime(_) => true,
|
||||||
token::Interpolated(nt) => {
|
token::Interpolated(nt) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user