From f2ee6e1a1d49d14ffac23df5cbcc73e36e20dadb Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Fri, 8 May 2026 05:16:29 -0400 Subject: [tnslc] boring if impl, need to fix bin bool ops --- tnslc/compile/var.tnsl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tnslc/compile/var.tnsl') 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") -- cgit v1.2.3