X-Git-Url: https://ruin.nu/git/?p=proglang.git;a=blobdiff_plain;f=Skelsyntax.hs;h=7efec8512f8ca8ea0c89e36a68268106dfd05fe4;hp=9f3feab046e4624d3c594fad502219d14a04f1a6;hb=HEAD;hpb=99548e772decde168669179c0da03109a9df5356 diff --git a/Skelsyntax.hs b/Skelsyntax.hs index 9f3feab..7efec85 100644 --- a/Skelsyntax.hs +++ b/Skelsyntax.hs @@ -26,9 +26,9 @@ 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 @@ -40,6 +40,7 @@ transStm x = case x of SWhile exp stm -> failure x SIf exp stm0 stm -> failure x SPrint exp -> failure x + SReturn exp -> failure x SNoop -> failure x @@ -53,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