This commit is contained in:
2024-09-28 15:13:45 +02:00
parent 31a4cdaca8
commit 0dccdc0a95
10 changed files with 549 additions and 0 deletions

27
a4/src/APL/AST.hs Normal file
View File

@ -0,0 +1,27 @@
module APL.AST
( VName,
Exp (..),
)
where
type VName = String
data Exp
= CstInt Integer
| CstBool Bool
| Add Exp Exp
| Sub Exp Exp
| Mul Exp Exp
| Div Exp Exp
| Pow Exp Exp
| Eql Exp Exp
| If Exp Exp Exp
| Var VName
| Let VName Exp Exp
| Lambda VName Exp
| Apply Exp Exp
| TryCatch Exp Exp
| Print String Exp
| KvPut Exp Exp
| KvGet Exp
deriving (Eq, Show)