diff options
| author | Kai Gunger <kgunger12@gmail.com> | 2026-05-08 05:16:29 -0400 |
|---|---|---|
| committer | Kai Gunger <kgunger12@gmail.com> | 2026-05-08 05:16:29 -0400 |
| commit | f2ee6e1a1d49d14ffac23df5cbcc73e36e20dadb (patch) | |
| tree | 0f7ea6d6b513675d06557ad59e6c1c3ca969e3ed /tnslc/compile/var.tnsl | |
| parent | b140289c4064d3a813d0d3d8a4ffb65ba684c733 (diff) | |
[tnslc] boring if impl, need to fix bin bool ops
Diffstat (limited to 'tnslc/compile/var.tnsl')
| -rw-r--r-- | tnslc/compile/var.tnsl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tnslc/compile/var.tnsl b/tnslc/compile/var.tnsl index 63758ea..122233a 100644 --- a/tnslc/compile/var.tnsl +++ b/tnslc/compile/var.tnsl @@ -1662,6 +1662,26 @@ struct Var { self._unary(buf, "dec\0") ;/ + /; test (~CompBuf buf) + ~uint8 to_str = self._set_prim_l(buf) + buf`.add_c(" cmp \0") + /; if (self.in_mem() == true) + uint sz = self.type_size() + /; if (sz == 1) + buf`.add_c("byte \0") + ;; else if (sz == 2) + buf`.add_c("word \0") + ;; else if (sz == 4) + buf`.add_c("dword \0") + ;; else if (sz == 8) + buf`.add_c("qword \0") + ;/ + ;/ + buf`.add_c(to_str) + buf`.add_c(", 0\n\0") + _delete(to_str) + ;/ + /; member (~CompBuf buf, ~uint8 name) [Var] /; if (self.is_struct() == false) _printf("ERROR: Attempted to get a member named \"\0") |