1
Fork 0

Allow .. to be parsed as let initializer

.. and ..= are valid expressions, however when used in a let statement
it is not parsed.
This commit is contained in:
Deep Majumder 2022-12-14 19:10:03 +05:30
parent 71ec1457ee
commit c4d0c91161
3 changed files with 19 additions and 3 deletions

View file

@ -379,6 +379,10 @@ impl Token {
}
}
pub fn is_range_seperator(&self) -> bool {
[DotDot, DotDotDot, DotDotEq].contains(&self.kind)
}
pub fn is_op(&self) -> bool {
match self.kind {
Eq | Lt | Le | EqEq | Ne | Ge | Gt | AndAnd | OrOr | Not | Tilde | BinOp(_)