diff options
| author | gingerBill <bill@gingerbill.org> | 2019-12-21 11:27:55 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-12-21 11:27:55 +0000 |
| commit | 19c32ecb811f88ce44c7b91e32497cd0aaf69275 (patch) | |
| tree | 467ac220eb1ab58e5692498781b1c696e547d11f /src/main.cpp | |
| parent | 494b1e7eaa0368f95fa7bd6d993a2f3ecec831ea (diff) | |
Add extra to `-help` output
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>"); |