From 7536e9aaaa8e7f76d69e6782d7c23afafdbe77f1 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Fri, 17 Feb 2023 04:26:10 -0500 Subject: Add enum variables and file defs to module listings --- tnslc/tnslc.tnsl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tnslc/tnslc.tnsl') diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl index 268e4fb..0c9b1f4 100644 --- a/tnslc/tnslc.tnsl +++ b/tnslc/tnslc.tnsl @@ -657,18 +657,13 @@ ;/ ;; else if (len artifact - 1 == r) /; loop (int i = 0; i < len (self.defs)) [i++] - /; if (string_equate(self.defs{i}.name, artifact{r})) + ;{}uint8 true_name = string_add(self.full_path(), artifact{r}) + /; if (string_equate(self.defs{i}.name, true_name)) ;return self.defs{i} ;/ ;/ ;/ - /; loop (int i = 0; i < len (self.defs)) [i++] - /; if (string_equate(self.defs{i}.name, artifact{r})) - ;return self.defs{i} - ;/ - ;/ - /; if (string_equate(self.name, "")) ;return {{}, "", 0, 0, 0} ;/ @@ -809,6 +804,8 @@ ;/ ;{}uint8 l = string_add(base, tok`{cur`}.data) + ;Variable v = {l, t, 0, LOCATION.LABEL} + ;current`.defs.append(v) /; if (current`.exp) ;out`.hsec = string_add(out`.hsec, "global ") @@ -1031,6 +1028,9 @@ ;out`.hsec = string_add(out`.hsec, l) ;out`.hsec.append('\n') ;/ + + ;Variable v = {l, et, 0, LOCATION.LABEL} + ;enum_mod.defs.append(v) ;l.append(':') ;l.append('\n') -- cgit v1.2.3