summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2026-07-11 06:08:40 -0400
committerKai Gunger <kgunger12@gmail.com>2026-07-11 06:08:40 -0400
commitbc52debb9566d4c4cbdb398837c3244e53b81e75 (patch)
tree3f05abb8b5cb1b0c7f68903ae2ec648df3b850c0
parent4fbc5d6511a404319a5392f96b105823a63de893 (diff)
[tnslc] bootstrap parser
-rw-r--r--tnslc/parse/ast.tnsl2
-rw-r--r--tnslc/test.tnsl9
2 files changed, 6 insertions, 5 deletions
diff --git a/tnslc/parse/ast.tnsl b/tnslc/parse/ast.tnsl
index b517e41..46b1025 100644
--- a/tnslc/parse/ast.tnsl
+++ b/tnslc/parse/ast.tnsl
@@ -1104,7 +1104,7 @@ int errors_shown = 0
_ast_block_pass(fin, first)
- /; if (_advance_check(fin, first`, ";/\0") == false)
+ /; if (_advance_check(fin, first, ";/\0") == false)
_ast_print_err(fin, ~blf, "Could not find closing ;/ for top block\0")
;/
blf.end()
diff --git a/tnslc/test.tnsl b/tnslc/test.tnsl
index 7570215..b515c49 100644
--- a/tnslc/test.tnsl
+++ b/tnslc/test.tnsl
@@ -28,10 +28,11 @@ usage:
utils.File fin
fin.init(argv{1})
- utils.Vector vec = parse.gen_token_list(~fin)
- parse.print_token_list(~vec)
- parse.end_token_list(~vec)
-
+ parse.Node ast = parse.generate_ast(~fin)
+ ast.update_children()
+ parse.print_ast(~ast)
+ ast.end()
+
fin.end()
return 0