Skip to content

Commit 2db6ed4

Browse files
committed
fix fib example
1 parent 1d21c76 commit 2db6ed4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/fib.cal

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
include "cores/select.cal"
22
include "std/io.cal"
33

4-
func fib begin
5-
let cell n
6-
-> n
7-
4+
func fib cell n -> cell res begin
85
if n 1 <= then
96
n return
107
else

source/backends/lua.d

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,9 @@ class BackendLua : CompilerBackend {
879879
output ~= format("func__%s()\n", node.func.Sanitise());
880880
}
881881

882-
output ~= "dspBackup = mem[vsp]\n";
882+
output ~= "dspBackup = mem[vsp]\n"; // TODO:
883+
// this is TERRIBLE
884+
// if you try/catch a function with a try/catch inside of it then it all breaks
883885
output ~= "vsp = vsp + 1\n";
884886

885887
++ blockCounter;

0 commit comments

Comments
 (0)