From b140289c4064d3a813d0d3d8a4ffb65ba684c733 Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Thu, 7 May 2026 02:00:45 -0400 Subject: [tnslc] fix members in binary operations --- tnslc/compile/var.tnsl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tnslc/compile/var.tnsl') diff --git a/tnslc/compile/var.tnsl b/tnslc/compile/var.tnsl index 9c7c042..63758ea 100644 --- a/tnslc/compile/var.tnsl +++ b/tnslc/compile/var.tnsl @@ -207,6 +207,12 @@ struct Var { return chk` == ptype ;/ + /; strip_refs + /; loop (self.is_ptrc(0, 0) == true) + self.ptr_pop() + ;/ + ;/ + # Returns true if the variable is a reference /; is_ref [bool] return self.is_ptrc(0, 0) @@ -1098,6 +1104,21 @@ struct Var { ;/ /; if (out{0} == '[') + utils.Vector vout + uint ts = self.type_size() + /; if (ts == 1) + vout.from_cstr("byte \0") + ;; else if (ts == 2) + vout.from_cstr("word \0") + ;; else if (ts == 4) + vout.from_cstr("dword \0") + ;; else if (ts == 8) + vout.from_cstr("qword \0") + ;/ + vout.push_cstr(out) + + _delete(out) + out = vout.as_cstr() ;/ return out -- cgit v1.2.3