pub enum Token {
}Expand description
Defines the tokens in the token stream generated by the lexer.
Variants§
Illegal
An illegal, unrecognized token.
Eof
Token marking the end of a file stream.
Ident(String)
Identifier, e.g., add, foobar, x, y, …
Int(i32)
Integer literal, e.g., [0-9]
String(String)
A string literal, e.g., "Hello, world!"
Assign
Assignment operator =
Plus
Summation arithmetic operator +
Minus
Subtraction arithmetic operator -
Bang
Negation logical operator !
Asterisk
Multiplication arithmetic operator *
Slash
Division arithmetic operator /
Lt
Less than logical operator <
Gt
Greater than logical operator >
Eq
Equality logical operator ==
NotEq
Inequality logical operator !=
Comma
Comma ,
Semicolon
Semicolon ;
Colon
Colon :
LParen
Left parenthesis (
RParen
Right parenthesis )
LBrace
Left curly brace {{
RBrace
Right curly bracket }}
LBracket
Left square bracket [
RBracket
Right square bracket ]
Function
fn keyword
Let
let keyword
True
true keyword
False
false keyword
If
if keyword
Else
else keyword
Return
return keyword