Updated Expression type

This commit is contained in:
2024-02-25 03:19:04 -06:00
parent cb2c4c76e8
commit ebaccecbb9

View File

@@ -32,11 +32,13 @@ data Expression
| LiteralBool Bool -- Boolean literal, e.g., True
| LiteralChar Char -- Character literal, e.g., 'a'
| LiteralString String -- String literal, e.g., "Hello, World!"
-- Lists
| Variable Identifier -- Variable reference, e.g., x
| BinaryOperation BinaryOperator Expression Expression -- Binary operation, e.g., x + y
| UnaryOperation UnaryOperator Expression -- Unary operation, e.g., -x
| FunctionCall Identifier [Expression] -- Function call, e.g., f(x, y)
| Ternary Expression Expression Expression -- Conditional expression, e.g., if x then y else z
| Expression Expression
deriving (Show)
data BinaryOperator