Struct hime_redist::tokens::Token
source · pub struct Token<'a> {
pub index: usize,
/* private fields */
}
Expand description
Represents a token as an output element of a lexer
Fields§
§index: usize
The index of this token in the text
Trait Implementations§
source§impl<'a> SemanticElementTrait for Token<'a>
impl<'a> SemanticElementTrait for Token<'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
impl<'a> Copy for Token<'a>
Implementation of Copy
for Token