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

This state is pushed whenever an opening bracket is found.

Fields of Open

The union of class items immediately preceding this class.

The class that has been opened. Typically this just corresponds to the [, but it can also include [^ since ^ indicates negation of the class.

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

The type of the operation, i.e., &&, -- or ~~.

The left-hand side of the operator.

Trait Implementations

impl Clone for ClassState
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for ClassState
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for ClassState

impl Sync for ClassState