[][src]Enum ketos::lexer::Token

pub enum Token<'lex> {
    LeftParen,
    RightParen,
    DocComment(&'lex str),
    Float(&'lex str),
    Integer(&'lex stru32),
    Ratio(&'lex str),
    Char(&'lex str),
    String(&'lex str),
    Byte(&'lex str),
    Bytes(&'lex str),
    Path(&'lex str),
    Name(&'lex str),
    Keyword(&'lex str),
    BackQuote,
    Comma,
    CommaAt,
    Quote,
    End,
}

Represents a single unit of code input.

Variants

LeftParen

Left parenthesis (

RightParen

Right parenthesis )

DocComment(&'lex str)

A series of line comments beginning with ;;, used to document declared values.

Float(&'lex str)

Floating point literal

Integer(&'lex stru32)

Integer literal in a given radix

Ratio(&'lex str)

Ratio literal

Char(&'lex str)

Character literal

String(&'lex str)

String literal

Byte(&'lex str)

Byte literal

Bytes(&'lex str)

Byte string literal

Path(&'lex str)

Path literal

Name(&'lex str)

Identifier name

Keyword(&'lex str)

Identifier keyword

BackQuote

Backtick quote `

Comma

Comma ,

CommaAt

Comma followed by at ,@

Quote

Single-quote '

End

End of input stream

Methods

impl<'lex> Token<'lex>[src]

pub fn name(&self) -> &'static str[src]

Returns a human-readable name of a token.

Trait Implementations

impl<'lex> Clone for Token<'lex>[src]

impl<'lex> Copy for Token<'lex>[src]

impl<'lex> Debug for Token<'lex>[src]

impl<'lex> Eq for Token<'lex>[src]

impl<'lex> PartialEq<Token<'lex>> for Token<'lex>[src]

impl<'lex> StructuralEq for Token<'lex>[src]

impl<'lex> StructuralPartialEq for Token<'lex>[src]

Auto Trait Implementations

impl<'lex> RefUnwindSafe for Token<'lex>

impl<'lex> Send for Token<'lex>

impl<'lex> Sync for Token<'lex>

impl<'lex> Unpin for Token<'lex>

impl<'lex> UnwindSafe for Token<'lex>

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,