diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-11-23 13:05:49 -0500 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-11-23 13:05:49 -0500 |
commit | 5eeec21759dc49252ebbcdb5e0d9336f68d0a51e (patch) | |
tree | f3b5b759a1f68962a77608e816bbc5d2702ac78b /tnslc/src/tnslc.tnsl | |
parent | 6444b3faef696b044d391b98151ebeb90eb3bb7f (diff) |
Some changes, plus a logo.
Diffstat (limited to 'tnslc/src/tnslc.tnsl')
-rw-r--r-- | tnslc/src/tnslc.tnsl | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/tnslc/src/tnslc.tnsl b/tnslc/src/tnslc.tnsl index 617e9e7..212819e 100644 --- a/tnslc/src/tnslc.tnsl +++ b/tnslc/src/tnslc.tnsl @@ -14,32 +14,25 @@ EXPRESS OR IMPLIED #/ -/; export module tnslc - :import "flags" - :import "parse" - :import "ast" - :import "compile" +/; module tnslc + :import "flags/flags.tnsl" + :import "parse/parse.tnsl" + :import "ast/ast.tnsl" + :import "compile/compile.tnsl" ;/ -:using 'tnsl' -:using 'tnslc' /; main (~{}{}char args) [int] - ;var arg_list = flags.parse(args) + ;tnslc.flags.Flags argList = tnslc.flags.parse(args) - ;var token_list = parse.tokenize(arg_list) + ;{}tnslc.parse.Token tokenList = tnslc.parse.tokenize(argList) - ;var ast = ast.generate(token_list) + ;tnslc.ast.Node ast = ast.generate(tokenList) - /; try - ;var out_file = file.open(arg_list.output_file_path) - ;var data = compile.generate(arg_list, ast) - - ;out_file.write(data) - ;out_file.close() + ;tnsl.io.File outFile = tnsl.io.open_file(argList.outPath) + ;[]uint8 data = tnslc.compile.generate(argList, ast) + + ;outFile.write(data) - ;; catch (error e) - ;io.stdout.write(e.msg) - ;return e.code - ;/ -;/
\ No newline at end of file + ;outFile.close() +;/ |