:import "c_wrap_linux.tnsl" :import "utils/utils.tnsl" :import "compile/compile.tnsl" ~uint8 DEFAULT_FOUT = "out.asm\0" ~uint8 USAGE = " TNSLC v0.5.0 (C) 2024 CircleShift usage: tnslc (file in) [file out] \0" ~uint8 FOPEN_ERR = "Error opening file\n\0" ~uint8 char_str = "%c\0" ~uint8 newline = "\n\0" ~uint8 scratch = "asd,efg\0" ~uint8 test = "asd\0" /; main (int argc, ~~uint8 argv) [int] asm "mov r10, rdi" asm "mov r11, rsi" /; if (argc < 2) _printf(USAGE) return 1 ;/ /; if (compile._in_csv(scratch, test)) _printf(test) _printf(newline) ;/ utils.File fin, fout fin.init(argv{1}) /; if (argc > 2) fout.init(argv{2}) ;; else fout.init(DEFAULT_FOUT) ;/ compile.generate(fin, fout) fin.end() fout.end() return 0 ;/