summaryrefslogtreecommitdiff
path: root/tnslc/tnslc.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-09-28 11:32:11 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-09-28 11:32:11 -0400
commitf927b5126ef7e219bc5d4aa875523df1f6ea6d83 (patch)
treefebf5655f3969f6259c1ff2ea2526666c4207d9a /tnslc/tnslc.tnsl
parent6917d1584bf16ec833a21fc35b95e520de8795f3 (diff)
Some basic asm generation around blocks
Diffstat (limited to 'tnslc/tnslc.tnsl')
-rw-r--r--tnslc/tnslc.tnsl12
1 files changed, 8 insertions, 4 deletions
diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl
index 2a19f20..76a10a3 100644
--- a/tnslc/tnslc.tnsl
+++ b/tnslc/tnslc.tnsl
@@ -24,12 +24,14 @@
/; main ({}{}charp args) [int]
- /; if (len args < 2)
- ;tnsl.io.println("Usage: tnslc [file in] [file out]")
+ /; if (len args < 1)
+ ;tnsl.io.println("Usage: tnslc [file in]")
;return 1
;/
- ;tnsl.io.File src = tnsl.io.readFile(args{0})
+ ;{}charp file = args{0}
+
+ ;tnsl.io.File src = tnsl.io.readFile(file)
;~{}tnslc.Token psrc = tnslc.parse.tokenize(src)
@@ -39,7 +41,9 @@
# ;tnslc.Node tree_node = tnslc.ast.make_tree(psrc, args{0})
- ;tnslc.do_compile(args{1}, psrc)
+ ;file.append('.')
+ ;file.append('S')
+ ;tnslc.do_compile(file, psrc)
;return 0
;/