Updated Expression type
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user