diff options
Diffstat (limited to 'lib/Language/Elna/AST.hs')
| -rw-r--r-- | lib/Language/Elna/AST.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Language/Elna/AST.hs b/lib/Language/Elna/AST.hs index 087c2fd..4861318 100644 --- a/lib/Language/Elna/AST.hs +++ b/lib/Language/Elna/AST.hs @@ -115,12 +115,12 @@ instance Show VariableDeclaration show (VariableDeclaration identifier typeExpression) = concat ["var ", show identifier, ": " <> show typeExpression, ";"] -newtype Expression +data Expression = LiteralExpression Literal -{- | VariableExpression VariableAccess - | NegationExpression Expression | SumExpression Expression Expression | SubtractionExpression Expression Expression +{- | VariableExpression VariableAccess + | NegationExpression Expression | ProductExpression Expression Expression | DivisionExpression Expression Expression -} deriving Eq @@ -128,10 +128,10 @@ newtype Expression instance Show Expression where show (LiteralExpression literal) = show literal - {- show (VariableExpression variable) = show variable - show (NegationExpression negation) = '-' : show negation show (SumExpression lhs rhs) = concat [show lhs, " + ", show rhs] show (SubtractionExpression lhs rhs) = concat [show lhs, " - ", show rhs] + {- show (VariableExpression variable) = show variable + show (NegationExpression negation) = '-' : show negation show (ProductExpression lhs rhs) = concat [show lhs, " * ", show rhs] show (DivisionExpression lhs rhs) = concat [show lhs, " / ", show rhs] -} {- |
