Conlang: Add range operators

TODO: Limit range operators to at most 2 operands
This commit is contained in:
2023-10-22 18:30:00 -05:00
parent b5abd2bff1
commit ccfddcc09a
4 changed files with 16 additions and 2 deletions

View File

@@ -17,7 +17,8 @@ Primary = Item | Identifier | Literal
(* expression::math *)
Ignore = Assign (IgnoreOp Assign )* ;
Assign = Compare (AssignOp Compare)* ;
Compare = Logic (CompareOp Logic )* ;
Compare = Range (CompareOp Range )* ;
Range = Logic (RangeOp Logic )* ;
Logic = Bitwise (LogicOp Bitwise)* ;
Bitwise = Shift (BitwiseOp Shift )* ;
Shift = Term (ShiftOp Term )* ;