diff options
| author | Kai Gunger <kgunger12@gmail.com> | 2026-07-11 14:43:40 -0400 |
|---|---|---|
| committer | Kai Gunger <kgunger12@gmail.com> | 2026-07-11 14:43:40 -0400 |
| commit | a27736576d56e14e9dc534004284d9a4a9356369 (patch) | |
| tree | cdb9aa7368b763fcb806dfc77d048aa7ea12e037 /tnslc/compile/scope.tnsl | |
| parent | bc52debb9566d4c4cbdb398837c3244e53b81e75 (diff) | |
[tnslc] bootstrap compiler
Diffstat (limited to 'tnslc/compile/scope.tnsl')
| -rw-r--r-- | tnslc/compile/scope.tnsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tnslc/compile/scope.tnsl b/tnslc/compile/scope.tnsl index 96d30fd..6271a35 100644 --- a/tnslc/compile/scope.tnsl +++ b/tnslc/compile/scope.tnsl @@ -271,7 +271,7 @@ struct Scope { ;/ /; if (self.parent !== NULL) - return self.parent`.find_var(name) + return self.parent`._find_var(name) ;/ return NULL @@ -293,6 +293,7 @@ struct Scope { _printf("\" but it doesn't look like it's been initialized yet!\n\0") _print_num(" Loc: %d\n\0", out`.loc) _print_num(" Offset: %d\n\0", out`.offset) + out`._print(0) return NULL ;/ @@ -305,7 +306,7 @@ struct Scope { int tmp = 0 /; if (v`.loc == 1) - int tmp = self._next_reg_slot() + tmp = self._next_reg_slot() v`.loc = tmp /; if (v`.loc + 1 == 0) tmp = self._next_stack_slot() @@ -359,7 +360,7 @@ struct Scope { int tmp = 0 /; if (v.regable() == true) - int tmp = self._next_tmp_slot() + tmp = self._next_tmp_slot() v.loc = tmp /; if (v.loc + 1 == 0) tmp = self._next_stack_slot() |