use crate::parser::Localization;
#[cfg(target_family = "wasm")]
use serde::{Deserialize, Serialize};
#[cfg_attr(
target_family = "wasm",
wasm_bindgen::prelude::wasm_bindgen,
derive(Serialize, Deserialize),
serde(rename_all(serialize = "kebab-case", deserialize = "kebab-case"))
)]
#[derive(Debug, Copy, Clone, PartialEq, clap::ValueEnum, strum::EnumString, strum::EnumIter)]
#[strum(serialize_all = "kebab-case")]
pub enum Experiment {
TailCalls,
RestArgs,
}
#[cfg_attr(
target_family = "wasm",
wasm_bindgen::prelude::wasm_bindgen(getter_with_clone),
derive(Serialize, Deserialize),
serde(rename_all(serialize = "kebab-case", deserialize = "kebab-case"))
)]
#[cfg_attr(not(target_family = "wasm"), derive(clap::Parser))]
#[derive(Debug, Clone, Default)]
pub struct Cli {
#[cfg_attr(not(target_family = "wasm"), arg(short, long, default_value = "en"))]
pub locale: Localization,
#[cfg_attr(not(target_family = "wasm"), arg(long))]
pub warranty: bool,
#[cfg_attr(
not(target_family = "wasm"),
arg(short = 'x', long, value_delimiter = ',')
)]
pub experiments: Vec<Experiment>,
}