summaryrefslogtreecommitdiff
path: root/tnslc/ast
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/ast')
-rw-r--r--tnslc/ast/list.tnsl4
-rw-r--r--tnslc/ast/value.tnsl14
2 files changed, 15 insertions, 3 deletions
diff --git a/tnslc/ast/list.tnsl b/tnslc/ast/list.tnsl
index b9d8080..da6a682 100644
--- a/tnslc/ast/list.tnsl
+++ b/tnslc/ast/list.tnsl
@@ -29,7 +29,7 @@
/; loop (cur` < len tok`) [cur` = cur` + 1]
;Node stmt = tree_statement(tok, cur)
- ;append(out, stmt)
+ ;out.append(stmt)
;Token tmp = tok`{cur`}
/; if (string_equate(tmp.data, "]") || string_equate(tmp.data, ")"))
@@ -58,7 +58,7 @@
;Node tmp
/; if (type_then_name(tok, cur))
;tmp = tree_type(tok, cur)
- ;append(out, tmp)
+ ;out.append(tmp)
;/
;tmp = tree_value(tok, cur)
diff --git a/tnslc/ast/value.tnsl b/tnslc/ast/value.tnsl
index d90c00a..d4cef56 100644
--- a/tnslc/ast/value.tnsl
+++ b/tnslc/ast/value.tnsl
@@ -14,9 +14,21 @@
EXPRESS OR IMPLIED
#/
-/; tree_type [Node]
+/; tree_type (~{}Token tok, ~int cur) [Node]
;Token type_tok = {NODE_TYPE.TYPE, 0, 0, ~CNULL}
;{}Node type_sub = {}
+
+ # Pre type keyword checks
+ /; loop (tok`{cur`}.token_type !== TOKEN_TYPE.DEFWORD && tok`{cur`}.token_type !== TOKEN_TYPE.KEYTYPE)
+ /; if (tok`{cur`}.token_type == TOKEN_TYPE.KEYWORD)
+
+ ;/
+ ;/
+
+ /;
+
+ ;/
+
;return {type_tok, ~type_sub}
;/