From 5eeec21759dc49252ebbcdb5e0d9336f68d0a51e Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Tue, 23 Nov 2021 13:05:49 -0500 Subject: Some changes, plus a logo. --- tnslc/src/tnslc.tnsl | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'tnslc/src/tnslc.tnsl') 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() +;/ -- cgit v1.2.3