Commit 3638e0ef authored by Tadej Borovšak's avatar Tadej Borovšak
Browse files

Make AST types comparable

This makes it possible to write unit tests for parser.
parent 7a19bf92
......@@ -7,13 +7,13 @@ data AExp =
Loc String |
Num Integer |
AOp (String, AExp, AExp)
deriving Show
deriving (Show, Eq)
-- boolean expressions
data BExp =
Boolean Bool |
BOp (String, AExp, AExp)
deriving Show
deriving (Show, Eq)
-- commands
data Com =
......@@ -22,4 +22,4 @@ data Com =
Seq (Com, Com) |
Skip |
While (BExp, Com)
deriving Show
deriving (Show, Eq)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment