ding
authorMart Lubbers <mart@martlubbers.net>
Fri, 20 May 2016 11:46:09 +0000 (13:46 +0200)
committerMart Lubbers <mart@martlubbers.net>
Fri, 20 May 2016 11:46:09 +0000 (13:46 +0200)
examples/high.spl [new file with mode: 0644]
gen.icl

diff --git a/examples/high.spl b/examples/high.spl
new file mode 100644 (file)
index 0000000..6750769
--- /dev/null
@@ -0,0 +1,9 @@
+plus(x, y) {
+       return x + y;
+}
+
+main (){
+       
+       var f = plus();
+       return 5;
+}
diff --git a/gen.icl b/gen.icl
index efa8fa3..bf3d7c4 100644 (file)
--- a/gen.icl
+++ b/gen.icl
@@ -44,6 +44,7 @@ defaultAddressBook = extend "1printint" (LAB "1printint")
        $ extend "1printchar" (LAB "1printchar")
        $ extend "1readchar" (LAB "1readchar")
        $ extend "1readint" (LAB "1readint")
+       $ extend "isEmpty" (LAB "isempty")
        'Map'.newMap
 
 gen :: AST -> Either String String
@@ -82,7 +83,7 @@ programContext =    [Lab "1printint"
                     ,Instr "str" [Raw "RR"] ""
                     ,Instr "unlink" [] ""
                     ,Instr "ret" [] ""
-                    ,Lab "isEmpty"
+                    ,Lab "isempty"
                     ,Instr "link" [Lit 0] ""
                     ,Instr "ldl" [Lit -2] "load prt to list"
                     ,Instr "lda" [Lit 0] "derefrence ptr"