nushell/src/parser/parse/flag.rs

18 lines
411 B
Rust
Raw Normal View History

2019-06-22 05:43:37 +02:00
use crate::parser::Span;
use derive_new::new;
use getset::Getters;
use serde_derive::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Deserialize, Serialize)]
2019-06-22 05:43:37 +02:00
pub enum FlagKind {
Shorthand,
Longhand,
}
2019-06-22 05:43:37 +02:00
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Getters, new)]
#[get = "crate"]
pub struct Flag {
kind: FlagKind,
name: Span,
}