mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
27 lines
597 B
Rust
27 lines
597 B
Rust
|
use std::path::PathBuf;
|
||
|
use clap::{ Parser, Subcommand };
|
||
|
|
||
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||
|
|
||
|
/// Vy language compiler.
|
||
|
#[derive(Parser, Debug)]
|
||
|
#[clap(
|
||
|
version = VERSION,
|
||
|
long_about = None)]
|
||
|
pub struct Args {
|
||
|
#[clap(subcommand)]
|
||
|
pub options: Options,
|
||
|
}
|
||
|
|
||
|
#[derive(Subcommand, Debug)]
|
||
|
pub enum Options {
|
||
|
#[clap(about = "Compile a file.")]
|
||
|
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,
|
||
|
},
|
||
|
}
|