Fix #20616
This commit is contained in:
parent
9d439b4177
commit
0ad48e41c1
13 changed files with 507 additions and 2 deletions
|
@ -173,6 +173,14 @@ pub enum Token {
|
|||
}
|
||||
|
||||
impl Token {
|
||||
/// Returns `true` if the token starts with '>'.
|
||||
pub fn is_like_gt(&self) -> bool {
|
||||
match *self {
|
||||
BinOp(Shr) | BinOpEq(Shr) | Gt | Ge => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns `true` if the token can appear at the start of an expression.
|
||||
pub fn can_begin_expr(&self) -> bool {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue