Enum regex_syntax::ast::parse::ClassState
source · enum ClassState {
Open {
union: ClassSetUnion,
set: ClassBracketed,
},
Op {
kind: ClassSetBinaryOpKind,
lhs: ClassSet,
},
}
Expand description
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
§
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 [
, but it can also include [^
since ^
indicates
negation of the class.
Op
This state is pushed when a operator is seen. When popped, the stored set becomes the left hand side of the operator.
Fields
§
kind: ClassSetBinaryOpKind
The type of the operation, i.e., &&, – or ~~.
Trait Implementations§
source§impl Clone for ClassState
impl Clone for ClassState
source§fn clone(&self) -> ClassState
fn clone(&self) -> ClassState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ClassState
impl RefUnwindSafe for ClassState
impl Send for ClassState
impl Sync for ClassState
impl Unpin for ClassState
impl UnwindSafe for ClassState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)