Add initial typechecker for AST #2
10
src/Ast.hs
10
src/Ast.hs
@ -24,7 +24,10 @@ data StatementExpression
|
||||
| ConstructorCall DataType [Expression]
|
||||
| MethodCall Expression Identifier [Expression]
|
||||
| TypedStatementExpression DataType StatementExpression
|
||||
| UnaryOperation UnaryOperator Expression
|
||||
| PostIncrement Expression
|
||||
| PostDecrement Expression
|
||||
| PreIncrement Expression
|
||||
| PreDecrement Expression
|
||||
deriving (Show, Eq)
|
||||
|
||||
data BinaryOperator
|
||||
@ -50,10 +53,6 @@ data BinaryOperator
|
||||
data UnaryOperator
|
||||
= Not
|
||||
| Minus
|
||||
| PostIncrement Expression
|
||||
| PostDecrement Expression
|
||||
| PreIncrement Expression
|
||||
| PreDecrement Expression
|
||||
deriving (Show, Eq)
|
||||
|
||||
data Expression
|
||||
@ -65,6 +64,7 @@ data Expression
|
||||
| LocalVariable Identifier
|
||||
| FieldVariable Identifier
|
||||
| BinaryOperation BinaryOperator Expression Expression
|
||||
| UnaryOperation UnaryOperator Expression
|
||||
| StatementExpressionExpression StatementExpression
|
||||
| TypedExpression DataType Expression
|
||||
deriving (Show, Eq)
|
||||
|
Loading…
Reference in New Issue
Block a user