Skip to content

Commit

Permalink
Document REPL mode in README and in command line usage
Browse files Browse the repository at this point in the history
  • Loading branch information
polybuildr committed Jun 8, 2017
1 parent 08741f0 commit c5038cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ This project is written in Rust. If you're unfamiliar with Rust, you should take
Balloon is currently not available on crates.io. You will need to build it yourself using Cargo.

```
usage: balloon [MODE] FILE
usage: balloon [[MODE] FILE]
where MODE is one of:
--run (default) runs the file
--check type check the file
--parse only parse the file, don't run it
Not passing any arguments to balloon will start the REPL.
```

(There is also an (even more) experimental LLVM backend that is not documented here.)
Expand Down
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,19 @@ use error::*;
// FIXME: How do you represent the usage style in POSIX notation?
fn print_usage() {
if cfg!(feature = "llvm-backend") {
println!("usage: balloon [--repl-llvm | [MODE] FILE ]
println!("usage: balloon [--repl-llvm | [MODE] FILE]
--repl-llvm launches the experimental REPL");
} else {
println!("usage: balloon [MODE] FILE");
println!("usage: balloon [[MODE] FILE]");
}
println!("
where MODE is one of:
--run (default) runs the file [FILE]
--check type check the file [FILE]
--parse only parse the file [FILE], don't run it");
--parse only parse the file [FILE], don't run it
Not passing any arguments to balloon will start the REPL.");
}

fn main() {
Expand Down

0 comments on commit c5038cb

Please sign in to comment.