Enum hime_redist::symbols::SemanticElement
[−]
[src]
pub enum SemanticElement<'a> { Token(Token<'a>), Terminal(Symbol), Variable(Symbol), Virtual(Symbol), }
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
Methods
impl<'a> SemanticElement<'a>
[src]
pub fn get_symbol_type(&self) -> SymbolType
[src]
Gets the type of the associated symbol
Trait Implementations
impl<'a> SemanticElementTrait for SemanticElement<'a>
[src]
fn get_position(&self) -> Option<TextPosition>
[src]
Gets the position in the input text of this element
fn get_span(&self) -> Option<TextSpan>
[src]
Gets the span in the input text of this element
fn get_context(&self) -> Option<TextContext>
[src]
Gets the context of this element in the input
fn get_symbol(&self) -> Symbol
[src]
Gets the grammar symbol associated to this element
fn get_value(&self) -> Option<String>
[src]
Gets the value of this element, if any