mirror of
https://github.com/LucasVbr/croissant.git
synced 2026-12-05 15:20:50 +00:00
feat: Add boolean literal and comparable binary operators
This commit is contained in:
+11
-1
@@ -34,9 +34,19 @@ rule token = parse
|
||||
| '-' { MINUS }
|
||||
| '*' { TIMES }
|
||||
| '/' { DIV }
|
||||
| "==" { EQUAL_EQUAL }
|
||||
| "!=" { NOT_EQUAL }
|
||||
| "<" { LESS_THAN }
|
||||
| "<=" { LESS_THAN_EQUAL }
|
||||
| ">" { GREATER_THAN }
|
||||
| ">=" { GREATER_THAN_EQUAL }
|
||||
| "&&" { AMPERSAND_AMPERSAND }
|
||||
| "||" { BAR_BAR }
|
||||
| "!" { EXCLAMATION }
|
||||
|
||||
(* Keywords *)
|
||||
(* ... *)
|
||||
| "vrai" { BOOLEAN(true) }
|
||||
| "faux" { BOOLEAN(false) }
|
||||
|
||||
(* Literals *)
|
||||
| interger as i { INT (int_of_string i) }
|
||||
|
||||
Reference in New Issue
Block a user