X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Skelsyntax.hs;h=7efec8512f8ca8ea0c89e36a68268106dfd05fe4;hb=cdcd3b92ee3145e646634d428b02118238d47f33;hp=bc9bc0cd636ac74859db584ea12a06693837fbec;hpb=565fbd61dca527c23888e08783d0d91cee458524;p=proglang.git diff --git a/Skelsyntax.hs b/Skelsyntax.hs index bc9bc0c..7efec85 100644 --- a/Skelsyntax.hs +++ b/Skelsyntax.hs @@ -26,20 +26,22 @@ transType x = case x of TBool -> failure x -transStms :: Stms -> Result -transStms x = case x of - Program stms -> failure x +transProgram :: Program -> Result +transProgram x = case x of + Program funcstms -> failure x transStm :: Stm -> Result transStm x = case x of SExp exp -> failure x SBlock stms -> failure x + SDecl type' id exp -> failure x + SDeclD type' id -> failure x SWhile exp stm -> failure x SIf exp stm0 stm -> failure x SPrint exp -> failure x + SReturn exp -> failure x SNoop -> failure x - SDecl type' id exp -> failure x transExp :: Exp -> Result @@ -52,10 +54,27 @@ transExp x = case x of ENot exp -> failure x EReadI -> failure x EReadB -> failure x + EFunc id exps -> failure x BiOpExp exp0 op exp -> failure x EPost id op -> failure x +transDecl :: Decl -> Result +transDecl x = case x of + Decl type' id -> failure x + + +transFunc :: Func -> Result +transFunc x = case x of + Func type' id decls stms -> failure x + + +transFuncStm :: FuncStm -> Result +transFuncStm x = case x of + S stm -> failure x + F func -> failure x + + transOp :: Op -> Result transOp x = case x of Lt -> failure x