[−][src]Enum erl_tokenize::LexicalToken
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]
pub fn text(&self) -> &str
[src]
Returns the original textual representation of this token.
pub fn as_atom_token(&self) -> Option<&AtomToken>
[src]
Tries to return the reference to the inner AtomToken
.
pub fn as_char_token(&self) -> Option<&CharToken>
[src]
Tries to return the reference to the inner CharToken
.
pub fn as_float_token(&self) -> Option<&FloatToken>
[src]
Tries to return the reference to the inner FloatToken
.
pub fn as_integer_token(&self) -> Option<&IntegerToken>
[src]
Tries to return the reference to the inner IntegerToken
.
pub fn as_keyword_token(&self) -> Option<&KeywordToken>
[src]
Tries to return the reference to the inner KeywordToken
.
pub fn as_string_token(&self) -> Option<&StringToken>
[src]
Tries to return the reference to the inner StringToken
.
pub fn as_symbol_token(&self) -> Option<&SymbolToken>
[src]
Tries to return the reference to the inner SymbolToken
.
pub fn as_variable_token(&self) -> Option<&VariableToken>
[src]
Tries to return the reference to the inner VariableToken
.
pub fn into_atom_token(self) -> Result<AtomToken, Self>
[src]
Tries to return the inner AtomToken
.
pub fn into_char_token(self) -> Result<CharToken, Self>
[src]
Tries to return the inner CharToken
.
pub fn into_float_token(self) -> Result<FloatToken, Self>
[src]
Tries to return the inner FloatToken
.
pub fn into_integer_token(self) -> Result<IntegerToken, Self>
[src]
Tries to return the inner IntegerToken
.
pub fn into_keyword_token(self) -> Result<KeywordToken, Self>
[src]
Tries to return the inner KeywordToken
.
pub fn into_string_token(self) -> Result<StringToken, Self>
[src]
Tries to return the inner StringToken
.
pub fn into_symbol_token(self) -> Result<SymbolToken, Self>
[src]
Tries to return the inner SymbolToken
.
pub fn into_variable_token(self) -> Result<VariableToken, Self>
[src]
Tries to return the inner VariableToken
.
Trait Implementations
impl PositionRange for LexicalToken
[src]
fn start_position(&self) -> Position
[src]
fn end_position(&self) -> Position
[src]
impl Clone for LexicalToken
[src]
fn clone(&self) -> LexicalToken
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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
[src]
impl From<IntegerToken> for LexicalToken
[src]
fn from(f: IntegerToken) -> Self
[src]
impl From<KeywordToken> for LexicalToken
[src]
fn from(f: KeywordToken) -> Self
[src]
impl From<StringToken> for LexicalToken
[src]
fn from(f: StringToken) -> Self
[src]
impl From<SymbolToken> for LexicalToken
[src]
fn from(f: SymbolToken) -> Self
[src]
impl From<VariableToken> for LexicalToken
[src]
fn from(f: VariableToken) -> Self
[src]
impl From<LexicalToken> for Token
[src]
fn from(f: LexicalToken) -> Self
[src]
impl Display for LexicalToken
[src]
impl Debug for LexicalToken
[src]
Auto Trait Implementations
impl Send for LexicalToken
impl Sync for LexicalToken
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,