diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 6950f3ecb..51fe5167c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1039,10 +1039,28 @@ int main(int arg_count, char const **arg_ptr) { print_usage_line(1, "%.*s %.*s [arguments]", LIT(args[0]), LIT(command)); print_usage_line(0, ""); + if (command == "build") { + print_usage_line(1, "build compile .odin file, or directory of .odin files, as an executable."); + print_usage_line(1, " one must contain the program's entry point, all must be in the same package."); + } else if (command == "run") { + print_usage_line(1, "run same as 'build', but also then runs the newly compiled executable."); + } else if (command == "check") { + print_usage_line(1, "check parse and type check .odin file"); + } else if (command == "query") { + print_usage_line(1, "query parse, type check, and output a .json file containing information about the program"); + } else if (command == "docs") { + print_usage_line(1, "docs generate documentation for a .odin file"); + } else if (command == "version") { + print_usage_line(1, "version print version"); + } + bool build = command == "build"; bool run_or_build = command == "run" || command == "build"; bool check = command == "run" || command == "build" || command == "check"; + print_usage_line(0, ""); + print_usage_line(1, "Flags"); + print_usage_line(0, ""); if (run_or_build) { print_usage_line(1, "-out:<filepath>"); |