summaryrefslogtreecommitdiff
path: root/tnslc
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-08-03 04:11:27 -0400
committerKyle Gunger <kgunger12@gmail.com>2024-08-03 04:11:27 -0400
commit7447a2a388ad0236a42aeb210019e3d596a6eb8c (patch)
tree7a5e9a23c1998f9cb4cf411ff0db9351782b054c /tnslc
parentb00a5a1123c920a4fc2737fee68347f6285d9ffd (diff)
Memory leak fix and user type fix
Diffstat (limited to 'tnslc')
-rw-r--r--tnslc/parse/ast.tnsl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tnslc/parse/ast.tnsl b/tnslc/parse/ast.tnsl
index 60676d4..3afce74 100644
--- a/tnslc/parse/ast.tnsl
+++ b/tnslc/parse/ast.tnsl
@@ -151,6 +151,7 @@ struct Node {
Node utp
utp.init(NTYPE_ID, first`.data)
first` = produce_next_token(fin, first`)
+ mod`.sub.push(~utp)
/; if (first`._type !== TTYPE_AUG || first`.eq(".\0") == false)
run = false
@@ -225,7 +226,7 @@ struct Node {
/; _ast_list_decl (~utils.File fin, ~Node mod, ~Token first)
Node list
- list.init(NTYPE_DLIST)
+ list.init(NTYPE_DLIST, first`.data)
uint8 end = _get_closing_delim(first`.data`)
@@ -258,7 +259,7 @@ struct Node {
/; _ast_list_enum (~utils.File fin, ~Node mod, ~Token first)
Node list
- list.init(NTYPE_ELIST)
+ list.init(NTYPE_ELIST, first`.data)
uint8 end = _get_closing_delim(first`.data`)
@@ -299,7 +300,7 @@ struct Node {
/; _ast_list_type (~utils.File fin, ~Node mod, ~Token first)
Node list
- list.init(NTYPE_TLIST)
+ list.init(NTYPE_TLIST, first`.data)
uint8 end = _get_closing_delim(first`.data`)