Enabled structure access

This commit is contained in:
VegOwOtenks 2025-02-21 17:26:27 +01:00
parent 21bec764db
commit 753f429ec8
2 changed files with 4 additions and 0 deletions

View file

@ -30,6 +30,9 @@ data Expression = Binary BinaryOperator Expression Expression
operatorTable :: Monad m => [[Operator String u m Expression]]
operatorTable =
[
[ Infix (UbcLanguage.reservedOperator "." $> Binary StructureAccess) AssocLeft
]
,
[ Infix (UbcLanguage.reservedOperator "*" $> Binary Multiply) AssocLeft
, Infix (UbcLanguage.reservedOperator "/" $> Binary Divide) AssocLeft
, Infix (UbcLanguage.reservedOperator "%" $> Binary Modulo) AssocLeft

View file

@ -26,4 +26,5 @@ data BinaryOperator = Plus
| LogicAnd
| LogicOr
| Assign
| StructureAccess
deriving (Show)