Skip to content

Commit

Permalink
improve help message
Browse files Browse the repository at this point in the history
  • Loading branch information
FilippoRanza committed Oct 20, 2020
1 parent 32a35ae commit db1256c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ use std::io::{Read, Write};
use std::path::{Path, PathBuf};

#[derive(StructOpt, Debug)]
#[structopt(about = "Compile or Check a Simpla program")]
enum Action {
#[structopt(about = "Check for program correctness")]
Check { source_file: PathBuf },
#[structopt(about = "Compile a Simpla program to simplac bytecode")]
#[structopt(about = "Check a Simpla program for correctness")]
Check {
#[structopt(help = "Simpla source code input file")]
source_file: PathBuf
},
#[structopt(about = "Compile a Simpla program to Simpla bytecode")]
Translate(Arguments),
}

#[derive(StructOpt, Debug)]
struct Arguments {
#[structopt(help = "Simpla source code input file")]
source_file: PathBuf,
#[structopt(help = "Simpla bytecode output file")]
output_file: Option<PathBuf>,
}

Expand Down

0 comments on commit db1256c

Please sign in to comment.