make UnaryOperation a statementexpression

This commit is contained in:

View File

@ -24,10 +24,7 @@ data StatementExpression
| ConstructorCall DataType [Expression]
| MethodCall Expression Identifier [Expression]
| TypedStatementExpression DataType StatementExpression
| PostIncrement Expression
| PostDecrement Expression
| PreIncrement Expression
| PreDecrement Expression
| UnaryOperation UnaryOperator Expression
deriving (Show, Eq)
data BinaryOperator
@ -53,6 +50,10 @@ data BinaryOperator
data UnaryOperator
= Not
| Minus
| PostIncrement Expression
| PostDecrement Expression
| PreIncrement Expression
| PreDecrement Expression
deriving (Show, Eq)
data Expression
@ -64,7 +65,6 @@ data Expression
| LocalVariable Identifier
| FieldVariable Identifier
| BinaryOperation BinaryOperator Expression Expression
| UnaryOperation UnaryOperator Expression
| StatementExpressionExpression StatementExpression
| TypedExpression DataType Expression
deriving (Show, Eq)