Skip to content

Commit

Permalink
Update help infos
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed Nov 2, 2023
1 parent e7c4d68 commit 86339f3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 28 deletions.
2 changes: 1 addition & 1 deletion vstc/src/assemble_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ fn show_help() {
println!("Convert ValueScript assembly to bytecode");
println!();
println!("USAGE:");
println!(" vstc assemble <file>");
println!(" vstc assemble <file>");
}
2 changes: 1 addition & 1 deletion vstc/src/compile_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ fn show_help() {
println!("Compile ValueScript");
println!();
println!("USAGE:");
println!(" vstc compile <entry point>");
println!(" vstc compile <entry point>");
}
5 changes: 4 additions & 1 deletion vstc/src/db_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ pub fn db_command(args: &[String]) {
}

fn show_help() {
println!("vstc db [DB_PATH] [COMMAND] [ARGS]");
println!("vstc db");
println!();
println!("ValueScript database functionality");
println!();
println!("USAGE:");
println!(" vstc db [DB_PATH] [COMMAND] [ARGS]");
println!();
println!("Commands:");
println!(" help, -h, --help Show this message");
println!(" new [CLASS_FILE] [ARGS] Create a new database");
Expand Down
37 changes: 20 additions & 17 deletions vstc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,34 @@ fn show_help() {
println!("ValueScript toolchain 0.1.0");
println!();
println!("USAGE:");
println!(" vstc [OPTIONS] [SUBCOMMAND]");
println!(" vstc [OPTIONS] [SUBCOMMAND]");
println!();
println!("OPTIONS:");
println!(" -h, --help");
println!(" Print help information");
println!(" -h, --help");
println!(" Print help information");
println!();
println!(" -V, --version");
println!(" Print version information");
println!(" -V, --version");
println!(" Print version information");
println!();
println!("SUBCOMMANDS:");
println!(" compile");
println!(" Compile an entry point");
println!(" run");
println!(" Run a program");
println!();
println!(" assemble");
println!(" Convert assembly to bytecode");
println!(" db");
println!(" Database subcommands");
println!();
println!(" disassemble");
println!(" Convert bytecode to assembly");
println!(" compile");
println!(" Compile an entry point");
println!();
println!(" run");
println!(" Run a program");
println!(" assemble");
println!(" Convert assembly to bytecode");
println!();
println!(" repl");
println!(" Read Eval Print Loop");
println!(" disassemble (TODO)");
println!(" Convert bytecode to assembly");
println!();
println!(" host");
println!(" Start database server");
println!(" repl (TODO)");
println!(" Read Eval Print Loop");
println!();
println!(" host (TODO)");
println!(" Start database server");
}
16 changes: 8 additions & 8 deletions vstc/src/run_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ fn show_help() {
println!("Run a ValueScript program");
println!();
println!("USAGE:");
println!(" vstc run [OPTIONS] <file>");
println!(" vstc run [OPTIONS] <file>");
println!();
println!("OPTIONS:");
println!(" --assembly");
println!(" Interpret <file> as assembly");
println!(" --assembly");
println!(" Interpret <file> as assembly");
println!();
println!(" --bytecode");
println!(" Interpret <file> as bytecode");
println!(" --bytecode");
println!(" Interpret <file> as bytecode");
println!();
println!(" --typescript");
println!(" Interpret <file> as typescript");
println!(" --typescript");
println!(" Interpret <file> as typescript");
println!();
println!("NOTE:");
println!(" <file> will be interpreted based on file extension if not otherwise specified");
println!(" <file> will be interpreted based on file extension if not otherwise specified");
}

0 comments on commit 86339f3

Please sign in to comment.