blob: b515c49a2d6e7e132d1638956b04ed4e5b46185a (
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
31
32
33
34
35
36
37
38
39
40
|
import "utils/utils.tnsl"
import "parse/parse.tnsl"
# :import "compile/compile.tnsl"
~uint8 USAGE = "
TNSLP v0.1.0 (C) 2026 CircleShift (MPL 2.0)
usage:
tnslp (file in)
generates a parse tree of the given file
\0"
~uint8 FOPEN_ERR = "Error opening file\n\0"
~uint8 char_str = "%c\0"
~uint8 newline = "\n\0"
/; main (int argc, ~~uint8 argv) [int]
asm "mov r10, rdi"
asm "mov r11, rsi"
/; if (argc < 2)
_printf(USAGE)
return 1
;/
utils.File fin
fin.init(argv{1})
parse.Node ast = parse.generate_ast(~fin)
ast.update_children()
parse.print_ast(~ast)
ast.end()
fin.end()
return 0
;/
|