Enum regex_syntax::ast::parse::Primitive[][src]

enum Primitive {
    Literal(Literal),
    Assertion(Assertion),
    Dot(Span),
    Perl(ClassPerl),
    Unicode(ClassUnicode),
}

A primitive is an expression with no sub-expressions. This includes literals, assertions and non-set character classes. This representation is used as intermediate state in the parser.

This does not include ASCII character classes, since they can only appear within a set character class.

Variants

Methods

impl Primitive
[src]

Return the span of this primitive.

Convert this primitive into a proper AST.

Convert this primitive into an item in a character class.

If this primitive is not a legal item (i.e., an assertion or a dot), then return an error.

Convert this primitive into a literal in a character class. In particular, literals are the only valid items that can appear in ranges.

If this primitive is not a legal item (i.e., a class, assertion or a dot), then return an error.

Trait Implementations

impl Clone for Primitive
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Primitive
[src]

Formats the value using the given formatter. Read more

impl Eq for Primitive
[src]

impl PartialEq for Primitive
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Primitive

impl Sync for Primitive