Token: Add range operators, rename for consistency

This commit is contained in:
2023-10-20 17:09:14 -05:00
parent 34525ec77a
commit 1e5f7149d9
6 changed files with 283 additions and 252 deletions

View File

@@ -8,8 +8,8 @@ Identifier = IDENTIFIER ;
(* # Expressions *)
(* expression *)
Block = '{' Expr? '}' ;
Expr = Ignore ;
Block = '{' Stmt* Expr? '}' ;
Group = '(' Expr? ')' ;
Primary = Item | Identifier | Literal
| Block | Group | Branch ;
@@ -30,6 +30,7 @@ IgnoreOp = ';' ;
AssignOp = '=' | "+=" | "-=" | "*=" | "/=" |
"&=" | "|=" | "^=" |"<<=" |">>=" ;
CompareOp = '<' | "<=" | "==" | "!=" | ">=" | '>' ;
RangeOp = ".." | "..=" ;
LogicOp = "&&" | "||" | "^^" ;
BitwiseOp = '&' | '|' | '^' ;