From 4c82f5bfdd7062f8bfd0a06bdd7e458caf5671eb Mon Sep 17 00:00:00 2001 From: Fabian Noll Date: Fri, 31 May 2024 10:34:52 +0200 Subject: [PATCH] Revert "make UnaryOperation a statementexpression" This reverts commit 25c0c331091e90e8fcd071e534cdf75a910e9ef3. --- src/Ast.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Ast.hs b/src/Ast.hs index 9fb1cea..a20b8e8 100644 --- a/src/Ast.hs +++ b/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)