From: Mart Lubbers Date: Thu, 12 May 2016 16:22:42 +0000 (+0200) Subject: clean X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=0550b08c78e662a4d920fb12128feb2fb44e7625;p=cc1516.git clean --- diff --git a/gen.icl b/gen.icl index 6039230..a37fedf 100644 --- a/gen.icl +++ b/gen.icl @@ -24,8 +24,6 @@ from Text import class Text(concat), instance Text String import AST import RWST -//Instruction is an instruction, with possible arguments and a possible comment -//Or is a label TRUE :== -1 FALSE :== 0 :: Instr = Instr String [Arg] String @@ -50,17 +48,6 @@ gen (AST fds) = case evalRWST prog "" ('Map'.newMap, labelStream) of Right (_, p) = Right $ toString p where prog = tell [Instr "bra" [L "main"] ""] >>| mapM_ g fds -//gen _ = prog -// where -// expr = (Op2Expr zero (Op1Expr zero UnMinus (IntExpr zero 4)) BiPlus (IntExpr zero 7)) -// expr2 = (FunExpr zero "test" [IntExpr zero 4] []) -// stmt = (IfStmt (BoolExpr zero True) [] []) -// prog = case evalRWST (g stmt) 0 ('Map'.newMap, labelStream) of -// Left (Error e) = abort e -// Right (_, prog) = toString prog -//gen _ = toString [Lab "Test" -// ,Instr "ldc" [Lit 1] "Eerste instructie" -// ,Instr "ldc" [Lit 2] "Tweede instructie"] //Current issues: //All VarDecls are added as function, how to deal with assignments?