Enum kailua_syntax::lex::Tok [] [src]

pub enum Tok {
    Error,
    Comment,
    Punct(Punct),
    Keyword(Keyword),
    Num(f64),
    Name(Name),
    Str(Str),
    EOF,
}

A token.

Variants

A token which is distinct from all other tokens.

The lexer emits this token on an error.

A comment token. The parser should ignore this.

The shebang line (the first line starting with #) is also considered as a comment.

A punctuation.

A keyword.

A number.

A name (either an identifier or a quoted name in the meta block).

A string (either "string" or [[string]]).

The end of file.

A valid stream of tokens is expected to have only one EOF token at the end.

Trait Implementations

impl Clone for Tok
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Tok
[src]

Formats the value using the given formatter.

impl PartialEq for Tok
[src]

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

This method tests for !=.

impl Localize for Tok
[src]

impl<'a> Localize for &'a Tok
[src]