pub enum SemanticElement<'a> {
    Token(Token<'a>),
    Terminal(Symbol),
    Variable(Symbol),
    Virtual(Symbol),
}
Expand description

Represents an element of parsing data

Variants§

§

Token(Token<'a>)

A token, i.e. a piece of text matched by a lexer

§

Terminal(Symbol)

A terminal symbol, defined in the original grammar

§

Variable(Symbol)

A variable symbol defined in the original grammar

§

Virtual(Symbol)

A virtual symbol, defined in the original grammar

Implementations§

Gets the type of the associated symbol

Trait Implementations§

Gets the position in the input text of this element
Gets the span in the input text of this element
Gets the context of this element in the input
Gets the grammar symbol associated to this element
Gets the value of this element, if any

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.