#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum QuantifierKind {
Optional,
ZeroOrMore,
OneOrMore,
}
impl QuantifierKind {
pub fn requires_row_capture(self) -> bool {
matches!(self, Self::ZeroOrMore | Self::OneOrMore)
}
pub fn is_non_empty(self) -> bool {
matches!(self, Self::OneOrMore)
}
pub fn can_be_empty(self) -> bool {
matches!(self, Self::Optional | Self::ZeroOrMore)
}
}