X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;ds=sidebyside;f=AST.dcl;h=1e241dd4068fe60f4f19d6082ee256aaf6bee4b2;hb=312e268e5861db8228099b57cde2b20edd31be8c;hp=0d8644f494e31ff4071d4d91f852e25f09030e23;hpb=fc38bf6ef5716c685ac316fdf3c42e7afce327eb;p=cc1516.git diff --git a/AST.dcl b/AST.dcl index 0d8644f..1e241dd 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]