summaryrefslogtreecommitdiff
path: root/tnslc/compile/var.tnsl
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2025-12-19 00:35:34 -0500
committerKai Gunger <kgunger12@gmail.com>2025-12-19 00:35:34 -0500
commitf9df5cb9c377b54ae56123416d7921cf870b0bb7 (patch)
treefe068decbdbfb18875792ae1b65aa04343c5037f /tnslc/compile/var.tnsl
parenta87a01d2d80e3bb764b9aa2051c9be7f47f977a6 (diff)
Change indentingorigin
Diffstat (limited to 'tnslc/compile/var.tnsl')
-rw-r--r--tnslc/compile/var.tnsl29
1 files changed, 5 insertions, 24 deletions
diff --git a/tnslc/compile/var.tnsl b/tnslc/compile/var.tnsl
index 9748ed4..5d86406 100644
--- a/tnslc/compile/var.tnsl
+++ b/tnslc/compile/var.tnsl
@@ -12,11 +12,6 @@ int32 PTYPE_REF = 0
# 1 Arr is ptr to arr, larger #s are static size arrs
int32 PTYPE_ARR = 1
-int PRIM_NON = 0
-int PRIM_BOO = 1
-int PRIM_INT = 2
-int PRIM_FLT = 3
-
~uint8 PRIM_CSV_BOO = "bool\0"
~uint8 PRIM_CSV_INT = "int,int8,int16,int32,int64,uint,uint8,uint16,uint32,uint64\0"
~uint8 PRIM_CSV_FLT = "float,float32,float64\0"
@@ -97,7 +92,7 @@ struct Var {
~uint8 name,
~Struct _type,
utils.Vector ptrc,
- int loc,
+ int loc, offset,
~parse.Node _tn, _id
}
@@ -143,8 +138,8 @@ struct Var {
_printf(self.name)
_printf("\n\0")
- _indent(idt)
- _printf(" type: \0")
+ _indent(idt + 1)
+ _printf("type: \0")
/; if (self._type !== NULL)
_printf(self._type`.name)
;; else
@@ -152,8 +147,8 @@ struct Var {
;/
_printf("\n\0")
- _indent(idt)
- _printf(" ptrc: \0")
+ _indent(idt + 1)
+ _printf("ptrc: \0")
~int32 istr
/; loop (int i = 0; i < self.ptrc.count) [i++]
istr = self.ptrc.get(i)
@@ -304,20 +299,6 @@ struct Var {
self.ptrc.pop()
;/
- /; is_primitive [int]
- ~uint8 tn = self`._type`.name
-
- /; if (parse._in_csv(PRIM_CSV_BOO, tn) == true)
- return PRIM_BOO
- ;; else if (parse._in_csv(PRIM_CSV_INT, tn) == true)
- return PRIM_INT
- ;; else if (parse._in_csv(PRIM_CSV_FLT, tn) == true)
- return PRIM_FLT
- ;/
-
- return PRIM_NON
- ;/
-
/; end
_delete(self.name)
self.ptrc.end()