diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-02-17 04:26:10 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-02-17 04:26:10 -0500 |
commit | 7536e9aaaa8e7f76d69e6782d7c23afafdbe77f1 (patch) | |
tree | 9f200a69b3ba27a9f8175abe1aa9c7db4884a2f7 | |
parent | 0505b7ee7aff33be604c24dd20b9c7c72067512a (diff) |
Add enum variables and file defs to module listings
-rw-r--r-- | tnslc/tnslc.tnsl | 14 |
1 files changed, 7 insertions, 7 deletions
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') |