diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -37,6 +37,7 @@ void print_usage() printf(" transpile Transpile to C code only (no compilation)\n"); printf(" lsp Start Language Server\n"); printf("Options:\n"); + printf(" --help Print this help message\n"); printf(" --version Print version information\n"); printf(" -o <file> Output executable name\n"); printf(" --emit-c Keep generated C file (out.c)\n"); @@ -92,6 +93,11 @@ int main(int argc, char **argv) { // default mode } + else if (strcmp(command, "--help") == 0 || strcmp(command, "-h") == 0) + { + print_usage(); + return 0; + } else if (command[0] == '-') { // implicit build or run? assume build if starts with flag, but usually |
