use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "maslc",
about = "MASL compiler — Maduka Authorization Specification Language",
version
)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand)]
pub enum Command {
Build {
path: PathBuf,
#[arg(short, long)]
output: Option<PathBuf>,
},
Check {
path: PathBuf,
},
Fmt {
path: PathBuf,
#[arg(long)]
check: bool,
#[arg(long)]
diff: bool,
},
Lint {
path: PathBuf,
#[arg(long)]
config: Option<PathBuf>,
},
Lsp {
#[arg(long)]
port: Option<u16>,
},
Explain {
code: String,
},
Doc {
path: PathBuf,
#[arg(short, long)]
output: Option<PathBuf>,
},
}