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

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

Left parenthesis (

Right parenthesis )

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

Floating point literal

Integer literal in a given radix

Ratio literal

Character literal

String literal

Byte literal

Byte string literal

Path literal

Identifier name

Identifier keyword

Backtick quote `

Comma ,

Comma followed by at ,@

Single-quote '

End of input stream

Methods

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

Returns a human-readable name of a token.

Trait Implementations

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.

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

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.