summaryrefslogtreecommitdiff
path: root/tnslc/compile/generator.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/compile/generator.tnsl')
-rw-r--r--tnslc/compile/generator.tnsl22
1 files changed, 4 insertions, 18 deletions
diff --git a/tnslc/compile/generator.tnsl b/tnslc/compile/generator.tnsl
index eedc552..10c75f8 100644
--- a/tnslc/compile/generator.tnsl
+++ b/tnslc/compile/generator.tnsl
@@ -1,25 +1,11 @@
-~uint8 TOKEN_COUNT = "Token count: %d\n\0"
/; generate (~utils.File fin, fout)
- utils.Vector tokens = tokenize(fin)
-
- _print_num(TOKEN_COUNT, tokens.count)
-
- fout`.create()
-
- /; loop (int i = 0; i < tokens.count) [i++]
- ~Token tok = tokens.get(i)
- ~uint8 buf = tok`.sprint()
- fout`.write_cstr(buf)
- fout`.write('\n')
- _delete(buf)
- ;/
-
- fout`.close()
-
- free_token_list(~tokens)
+ Node root
+ root.init(NT_MODULE, NULL)
+ build_file(fin, ~root)
+ root.end()
;/