Skip to content

Commit c5038cb

Browse files
committed
Document REPL mode in README and in command line usage
1 parent 08741f0 commit c5038cb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ This project is written in Rust. If you're unfamiliar with Rust, you should take
1313
Balloon is currently not available on crates.io. You will need to build it yourself using Cargo.
1414

1515
```
16-
usage: balloon [MODE] FILE
16+
usage: balloon [[MODE] FILE]
1717
1818
where MODE is one of:
1919
--run (default) runs the file
2020
--check type check the file
2121
--parse only parse the file, don't run it
22+
23+
Not passing any arguments to balloon will start the REPL.
2224
```
2325

2426
(There is also an (even more) experimental LLVM backend that is not documented here.)

src/main.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,19 @@ use error::*;
5757
// FIXME: How do you represent the usage style in POSIX notation?
5858
fn print_usage() {
5959
if cfg!(feature = "llvm-backend") {
60-
println!("usage: balloon [--repl-llvm | [MODE] FILE ]
60+
println!("usage: balloon [--repl-llvm | [MODE] FILE]
6161
6262
--repl-llvm launches the experimental REPL");
6363
} else {
64-
println!("usage: balloon [MODE] FILE");
64+
println!("usage: balloon [[MODE] FILE]");
6565
}
6666
println!("
6767
where MODE is one of:
6868
--run (default) runs the file [FILE]
6969
--check type check the file [FILE]
70-
--parse only parse the file [FILE], don't run it");
70+
--parse only parse the file [FILE], don't run it
71+
72+
Not passing any arguments to balloon will start the REPL.");
7173
}
7274

7375
fn main() {

0 commit comments

Comments
 (0)