1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00
bobbylisp/crates/main/src/args.rs

27 lines
598 B
Rust
Raw Normal View History

2022-02-11 04:38:04 -06:00
use std::path::PathBuf;
use clap::{ Parser, Subcommand };
const VERSION: &str = env!("CARGO_PKG_VERSION");
2022-03-06 10:51:03 -06:00
/// Hades compiler.
2022-02-11 04:38:04 -06:00
#[derive(Parser, Debug)]
#[clap(
version = VERSION,
long_about = None)]
pub struct Args {
#[clap(subcommand)]
pub options: Options,
}
#[derive(Subcommand, Debug)]
pub enum Options {
2022-02-11 05:16:13 -06:00
#[clap(about = "Compile an input file.")]
2022-02-11 04:38:04 -06:00
Compile {
/// The input file to compile.
#[clap(parse(from_os_str))]
input: PathBuf,
/// Print parsed AST and exit (for debugging).
#[clap(short, long)]
ast: bool,
},
}