1
Fork 0

Detect more => typos

Handle and recover `match expr { pat >= { arm } }`.
This commit is contained in:
Esteban Küber 2023-11-14 00:46:37 +00:00
parent 85b8450466
commit f830fe313b
5 changed files with 51 additions and 10 deletions

View file

@ -388,7 +388,8 @@ impl TokenKind {
match *self {
Comma => Some(vec![Dot, Lt, Semi]),
Semi => Some(vec![Colon, Comma]),
FatArrow => Some(vec![Eq, RArrow]),
Colon => Some(vec![Semi]),
FatArrow => Some(vec![Eq, RArrow, Ge, Gt]),
_ => None,
}
}