Enum hime_redist::symbols::SemanticElement
source · 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§
source§impl<'a> SemanticElement<'a>
impl<'a> SemanticElement<'a>
sourcepub fn get_symbol_type(&self) -> SymbolType
pub fn get_symbol_type(&self) -> SymbolType
Gets the type of the associated symbol
Trait Implementations§
source§impl<'a> SemanticElementTrait for SemanticElement<'a>
impl<'a> SemanticElementTrait for SemanticElement<'a>
source§fn get_position(&self) -> Option<TextPosition>
fn get_position(&self) -> Option<TextPosition>
Gets the position in the input text of this element
source§fn get_context(&self) -> Option<TextContext>
fn get_context(&self) -> Option<TextContext>
Gets the context of this element in the input
source§fn get_symbol(&self) -> Symbol
fn get_symbol(&self) -> Symbol
Gets the grammar symbol associated to this element