Enabled structure access
This commit is contained in:
parent
21bec764db
commit
753f429ec8
2 changed files with 4 additions and 0 deletions
|
@ -30,6 +30,9 @@ data Expression = Binary BinaryOperator Expression Expression
|
||||||
operatorTable :: Monad m => [[Operator String u m Expression]]
|
operatorTable :: Monad m => [[Operator String u m Expression]]
|
||||||
operatorTable =
|
operatorTable =
|
||||||
[
|
[
|
||||||
|
[ Infix (UbcLanguage.reservedOperator "." $> Binary StructureAccess) AssocLeft
|
||||||
|
]
|
||||||
|
,
|
||||||
[ Infix (UbcLanguage.reservedOperator "*" $> Binary Multiply) AssocLeft
|
[ Infix (UbcLanguage.reservedOperator "*" $> Binary Multiply) AssocLeft
|
||||||
, Infix (UbcLanguage.reservedOperator "/" $> Binary Divide) AssocLeft
|
, Infix (UbcLanguage.reservedOperator "/" $> Binary Divide) AssocLeft
|
||||||
, Infix (UbcLanguage.reservedOperator "%" $> Binary Modulo) AssocLeft
|
, Infix (UbcLanguage.reservedOperator "%" $> Binary Modulo) AssocLeft
|
||||||
|
|
|
@ -26,4 +26,5 @@ data BinaryOperator = Plus
|
||||||
| LogicAnd
|
| LogicAnd
|
||||||
| LogicOr
|
| LogicOr
|
||||||
| Assign
|
| Assign
|
||||||
|
| StructureAccess
|
||||||
deriving (Show)
|
deriving (Show)
|
||||||
|
|
Loading…
Reference in a new issue