From d77201023099377ed4d4559c26d2e02f4f61c114 Mon Sep 17 00:00:00 2001 From: pimjager Date: Fri, 6 May 2016 17:35:10 +0200 Subject: [PATCH] Added some comments on codegen --- gen.icl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gen.icl b/gen.icl index eb96982..71fe103 100644 --- a/gen.icl +++ b/gen.icl @@ -19,12 +19,17 @@ import AST :: Arg = L String | Lit Int :: SSMProgram :== [Instr] + gen :: AST -> String gen _ = toString [Label "Test" ,Instr "ldc" [Lit 1] "Eerste instructie" ,Instr "ldc" [Lit 2] "Tweede instructie"] +//Scrap this, we'll need shared state when generating +//i.e. to figure out the positions of vars relative to the +//SP/MP/whatever or in which register they are +//and to supply with fresh labels class g a :: a -> SSMProgram instance g Expr where -- 2.20.1