X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Skelsyntax.hs;h=07898ef6d2aa24e4e2ff417f75af2b21268368cb;hb=2c2f90fca1005f6dedc69ee7f3d7c5072e5c123b;hp=c1af30729a27da27cf5d3a1f820bc0ffaf8ebbf1;hpb=e9be0603d9dbd1caa6a0032cad0e39815cb8f38d;p=proglang.git diff --git a/Skelsyntax.hs b/Skelsyntax.hs index c1af307..07898ef 100644 --- a/Skelsyntax.hs +++ b/Skelsyntax.hs @@ -33,17 +33,17 @@ transStm x = case x of transExp :: Exp -> Result transExp x = case x of - BExp exp0 bop exp -> failure x - EVar id -> failure x EAss id exp -> failure x + EVar id -> failure x EInt n -> failure x ENeg exp -> failure x + ENot exp -> failure x EBool bool -> failure x EReadI -> failure x EReadB -> failure x ExpT type' exp -> failure x EDefault -> failure x - OpExp exp0 op exp -> failure x + BiOpExp exp0 op exp -> failure x EPost id op -> failure x @@ -52,18 +52,14 @@ transStms x = case x of Program stms -> failure x -transBOp :: BOp -> Result -transBOp x = case x of +transOp :: Op -> Result +transOp x = case x of Lt -> failure x ELt -> failure x Gt -> failure x EGt -> failure x Eq -> failure x NEq -> failure x - - -transOp :: Op -> Result -transOp x = case x of Plus -> failure x Minus -> failure x Times -> failure x