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
Error
A token which is distinct from all other tokens.
The lexer emits this token on an error.
Comment
A comment token. The parser should ignore this.
The shebang line (the first line starting with #
) is also considered as a comment.
Punct(Punct)
A punctuation.
Keyword(Keyword)
A keyword.
Num(f64)
A number.
Name(Name)
A name (either an identifier or a quoted name in the meta block).
Str(Str)
A string (either "string"
or [[string]]
).
EOF
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]
fn clone(&self) -> Tok
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Tok
[src]
impl PartialEq for Tok
[src]
fn eq(&self, __arg_0: &Tok) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Tok) -> bool
This method tests for !=
.