[][src]Enum erl_tokenize::LexicalToken

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]

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]

impl From<AtomToken> for LexicalToken[src]

impl From<CharToken> for LexicalToken[src]

impl From<FloatToken> for LexicalToken[src]

impl From<IntegerToken> for LexicalToken[src]

impl From<KeywordToken> for LexicalToken[src]

impl From<StringToken> for LexicalToken[src]

impl From<SymbolToken> for LexicalToken[src]

impl From<VariableToken> for LexicalToken[src]

impl From<LexicalToken> for Token[src]

impl Clone for LexicalToken[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for LexicalToken[src]

impl Display for LexicalToken[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]