X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=AST.dcl;h=ac1cf4e927ae805dcccf16b94bf7abac2ec5b1d6;hb=7a0e15a68547d29a87dd0c56d6f5a731d0cd67aa;hp=0d8644f494e31ff4071d4d91f852e25f09030e23;hpb=fc38bf6ef5716c685ac316fdf3c42e7afce327eb;p=cc1516.git diff --git a/AST.dcl b/AST.dcl index 0d8644f..ac1cf4e 100644 --- a/AST.dcl +++ b/AST.dcl @@ -14,6 +14,8 @@ from StdOverloaded import class toString | BoolType | CharType | VarType + | VoidType + | (->>) infixl 7 Type Type :: Expr = VarExpr Pos VarDef | Op2Expr Pos Expr Op2 Expr @@ -29,8 +31,7 @@ from StdOverloaded import class toString :: Op1 = UnNegation | UnMinus :: Op2 = BiPlus | BiMinus | BiTimes | BiDivide | BiMod | BiEquals | BiLesser | BiGreater | BiLesserEq | BiGreaterEq | BiUnEqual | BiAnd | BiOr | BiCons -:: FunDecl = FunDecl Pos String [String] (Maybe FunType) [VarDecl] [Stmt] -:: FunType = FunType [Type] (Maybe Type) +:: FunDecl = FunDecl Pos String [String] (Maybe Type) [VarDecl] [Stmt] :: FunCall = FunCall String [Expr] :: Stmt = IfStmt Expr [Stmt] [Stmt] @@ -40,3 +41,5 @@ from StdOverloaded import class toString | ReturnStmt (Maybe Expr) instance toString AST +instance toString Type +instance toString Pos