Enum regex_syntax::ast::parse::ClassState [−][src]
enum ClassState { Open { union: ClassSetUnion, set: ClassBracketed, }, Op { kind: ClassSetBinaryOpKind, lhs: ClassSet, }, }
ClassState represents a single stack frame while parsing character classes. Each frame records the state up to an intersection, difference, symmetric difference or nested class.
Note that a parser's character class stack is only non-empty when parsing a character class. In all other cases, it is empty.
Variants
Open
This state is pushed whenever an opening bracket is found.
Fields of Open
union: ClassSetUnion | The union of class items immediately preceding this class. |
set: ClassBracketed | The class that has been opened. Typically this just corresponds
to the |
Op
This state is pushed when a operator is seen. When popped, the stored set becomes the left hand side of the operator.
Fields of Op
kind: ClassSetBinaryOpKind | The type of the operation, i.e., &&, -- or ~~. |
lhs: ClassSet | The left-hand side of the operator. |
Trait Implementations
impl Clone for ClassState
[src]
impl Clone for ClassState
fn clone(&self) -> ClassState
[src]
fn clone(&self) -> ClassState
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ClassState
[src]
impl Debug for ClassState
Auto Trait Implementations
impl Send for ClassState
impl Send for ClassState
impl Sync for ClassState
impl Sync for ClassState