Struct Alternation
pub struct Alternation { pub span: Span, pub asts: Vec<Ast> }
An alternation of regular expressions.
Fields
span: SpanThe span of this alternation.
asts: Vec<Ast>The alternate regular expressions.
Implementations
impl Alternation
fn into_ast(self) -> AstReturn this alternation as an AST.
If this alternation contains zero ASTs, then
Ast::emptyis returned. If this alternation contains exactly 1 AST, then the corresponding AST is returned. Otherwise,Ast::alternationis returned.
Trait Implementations
impl Clone for Alternation
fn clone(&self) -> Self
impl Debug for Alternation
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Alternation
impl PartialEq for Alternation
fn eq(&self, other: &Self) -> bool