summaryrefslogtreecommitdiff
path: root/tnslc/compile/scope.tnsl
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2026-06-29 23:53:13 -0400
committerKai Gunger <kgunger12@gmail.com>2026-06-29 23:53:13 -0400
commita3fc7c905b780244a8984698116f10ad3fe6f6ed (patch)
treebfb4c76cb7742154dac63e9c32d4036496d00d28 /tnslc/compile/scope.tnsl
parenta79a6d8f9be059b2bf2c1fc6548592546322f53d (diff)
[tnslc] some random fixes, still need to fix parser
Diffstat (limited to 'tnslc/compile/scope.tnsl')
-rw-r--r--tnslc/compile/scope.tnsl9
1 files changed, 7 insertions, 2 deletions
diff --git a/tnslc/compile/scope.tnsl b/tnslc/compile/scope.tnsl
index dda3d9c..8a6747e 100644
--- a/tnslc/compile/scope.tnsl
+++ b/tnslc/compile/scope.tnsl
@@ -519,14 +519,19 @@ struct Scope {
;/
int stk_mv = 0
-
+ int tmp_count = self.tmps.count
+
~Var tmp
/; loop (int i = 1; i !> tmps) [i++]
- tmp = self.tmps.get(self.tmps.count - i)
+ tmp = self.tmps.get(tmp_count - i)
+
/; if (tmp`.loc < 0)
stk_mv = stk_mv + tmp`.actual_size()
;/
tmp`.end()
+ ;/
+
+ /; loop (int i = 0; i < tmps) [i++]
self.tmps.pop()
;/