//! Expected token description types.

use sipha_core::traits::TokenKind;

/// Type alias for expected token alternatives.
type ExpectedVec<K> = Vec<Expected<K>>;

/// Expected token description.
#[derive(Clone, Debug)]
pub enum Expected<K: TokenKind> {
    /// One explicit token kind.
    Single(K),
    /// Static set of acceptable kinds.
    Set(&'static [K]),
    /// Dynamic set computed at runtime.
    Dynamic(Vec<K>),
    /// Multiple alternatives that were all tried and failed.
    #[allow(clippy::type_complexity)]
    Multiple(ExpectedVec<K>),
}
