blob: ccb6b061ef2418b5f11ad251f39356d259e4868b (
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
30
|
/; generate (~utils.File fin, fout)
# Parse files into AST
parse.Node ast = parse.generate_ast(fin)
ast.update_children()
parse.print_ast(~ast)
# Create output buffer
CompBuf buffer
buffer.init()
# Transform into a module tree
# Module mod
# mod.init(~ast)
# mod.update_children()
# Compile code
# mod.compile(~buffer)
# Write assembly to output file
# fout.create()
# buffer.write_to(fout)
# fout.close()
# Free all structs
# mod.end()
buffer.end()
ast.end()
;/
|