Enum erl_tokenize::LexicalToken
[−]
[src]
pub enum LexicalToken { Atom(AtomToken), Char(CharToken), Float(FloatToken), Integer(IntegerToken), Keyword(KeywordToken), String(StringToken), Symbol(SymbolToken), Variable(VariableToken), }
Lexical token.
This kind of token is meaningful in lexical analysis.
Variants
Atom(AtomToken)
Char(CharToken)
Float(FloatToken)
Integer(IntegerToken)
Keyword(KeywordToken)
String(StringToken)
Symbol(SymbolToken)
Variable(VariableToken)
Methods
impl LexicalToken
[src]
fn text(&self) -> &str
Returns the original textual representation of this token.
fn as_atom_token(&self) -> Option<&AtomToken>
Tries to return the reference to the inner AtomToken
.
fn as_char_token(&self) -> Option<&CharToken>
Tries to return the reference to the inner CharToken
.
fn as_float_token(&self) -> Option<&FloatToken>
Tries to return the reference to the inner FloatToken
.
fn as_integer_token(&self) -> Option<&IntegerToken>
Tries to return the reference to the inner IntegerToken
.
fn as_keyword_token(&self) -> Option<&KeywordToken>
Tries to return the reference to the inner KeywordToken
.
fn as_string_token(&self) -> Option<&StringToken>
Tries to return the reference to the inner StringToken
.
fn as_symbol_token(&self) -> Option<&SymbolToken>
Tries to return the reference to the inner SymbolToken
.
fn as_variable_token(&self) -> Option<&VariableToken>
Tries to return the reference to the inner VariableToken
.
fn into_atom_token(self) -> Result<AtomToken, Self>
Tries to return the inner AtomToken
.
fn into_char_token(self) -> Result<CharToken, Self>
Tries to return the inner CharToken
.
fn into_float_token(self) -> Result<FloatToken, Self>
Tries to return the inner FloatToken
.
fn into_integer_token(self) -> Result<IntegerToken, Self>
Tries to return the inner IntegerToken
.
fn into_keyword_token(self) -> Result<KeywordToken, Self>
Tries to return the inner KeywordToken
.
fn into_string_token(self) -> Result<StringToken, Self>
Tries to return the inner StringToken
.
fn into_symbol_token(self) -> Result<SymbolToken, Self>
Tries to return the inner SymbolToken
.
fn into_variable_token(self) -> Result<VariableToken, Self>
Tries to return the inner VariableToken
.
Trait Implementations
impl Debug for LexicalToken
[src]
impl Clone for LexicalToken
[src]
fn clone(&self) -> LexicalToken
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl From<AtomToken> for LexicalToken
[src]
impl From<CharToken> for LexicalToken
[src]
impl From<FloatToken> for LexicalToken
[src]
fn from(f: FloatToken) -> Self
Performs the conversion.
impl From<IntegerToken> for LexicalToken
[src]
fn from(f: IntegerToken) -> Self
Performs the conversion.
impl From<KeywordToken> for LexicalToken
[src]
fn from(f: KeywordToken) -> Self
Performs the conversion.
impl From<StringToken> for LexicalToken
[src]
fn from(f: StringToken) -> Self
Performs the conversion.
impl From<SymbolToken> for LexicalToken
[src]
fn from(f: SymbolToken) -> Self
Performs the conversion.
impl From<VariableToken> for LexicalToken
[src]
fn from(f: VariableToken) -> Self
Performs the conversion.
impl PositionRange for LexicalToken
[src]
fn start_position(&self) -> Position
Returns the (inclusive) start position of this.
fn end_position(&self) -> Position
Returns the (exclusive) end position of this.