summaryrefslogtreecommitdiff
path: root/tnslc/compile/generate.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/compile/generate.tnsl')
-rw-r--r--tnslc/compile/generate.tnsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/tnslc/compile/generate.tnsl b/tnslc/compile/generate.tnsl
index ef6a76c..c05a304 100644
--- a/tnslc/compile/generate.tnsl
+++ b/tnslc/compile/generate.tnsl
@@ -1,6 +1,22 @@
+/; generate_module (~OutBuf buf, ~Module mod)
+;/
+
/; generate (~utils.File fin, fout)
parse.Node n = parse.generate_ast(fin)
n.update_children()
parse.print_ast(~n)
+
+ OutBuf buf
+ buf.init()
+
+ Module mod = transform_tree(~n, ~buf)
+ mod.print(0)
+
+
+ generate_module(~buf, ~mod)
+ buf.write_to_file(fout)
+
+ mod.end()
+ buf.end()
n.end()
;/