commit eccee2db450c8b9cd5610c1adc0e83021267bcf7 parent 8bf024bc3031563fb663418f272a8147ae16844c Author: Brian Swetland <swetland@frotz.net> Date: Tue, 30 Nov 2021 21:15:49 -0800 compiler: add usage message Diffstat:
M | src/compiler.c | | | 11 | ++++++++++- |
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/compiler.c b/src/compiler.c @@ -2870,7 +2870,16 @@ i32 main(int argc, args argv) { } if (srcname == nil) { - error("no file specified"); + printf( +"usage: compiler [ <option> | <sourcefilename> ]*\n" +"\n" +"options: -o <filename> binary output (default 'out.bin')\n" +" -l <filename> listing output (default none)\n" +" -v trace code generation\n" +" -s scan only\n" +" -p dump type context\n" +" -A abort on error\n"); + return 0; } ctx.filename = srcname;