summaryrefslogtreecommitdiff
path: root/tnslc/compile/generate.tnsl
blob: fbbb22930ed7742a76088d0f5ba5916486bd7b5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

struct Scope {
	~Scope parent,
	~uint8 name,

}

/; 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()
;/