From c5038cb51f8f5209abda3151fca2d55d69cc2e0f Mon Sep 17 00:00:00 2001 From: Vivek Ghaisas Date: Thu, 8 Jun 2017 09:39:42 +0300 Subject: [PATCH] Document REPL mode in README and in command line usage --- README.md | 4 +++- src/main.rs | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 07e39dc..d3af06a 100644 --- a/README.md +++ b/README.md @@ -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.) diff --git a/src/main.rs b/src/main.rs index afc6a14..7a1b4ae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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() {