Enum rurtle::lex::Token
[−]
[src]
pub enum Token { Word(String), Number(f32), LBracket, RBracket, LParens, RParens, Colon, String(String), OpEq, OpLt, OpGt, OpLe, OpGe, OpNe, OpPlus, OpMinus, OpMul, OpDiv, KeyLearn, KeyDo, KeyElse, KeyRepeat, KeyWhile, KeyIf, KeyEnd, KeyFor, KeyReturn, KeyTry, }
A Token
represents a "atom" block of the input source.
Variants
Word | An identifier, also called Word |
Number | |
LBracket | The left bracket [ |
RBracket | The right bracket ] |
LParens | The left parenthesis ( |
RParens | The right parenthesis ) |
Colon | The colon : |
String | A String enclosed in "quotes" |
OpEq | Operator "equals" = |
OpLt | Operator "less than" < |
OpGt | Operator "greater than" > |
OpLe | Operator "less or equal" <= |
OpGe | Operator "greater or equal" >= |
OpNe | Operator "not equal" <> |
OpPlus | Operator "plus" + |
OpMinus | Operator "minues" - |
OpMul | Operator "multipication" * |
OpDiv | Operator "division" / |
KeyLearn | Keyword "LEARN" |
KeyDo | Keyword "DO" |
KeyElse | Keyword "ELSE" |
KeyRepeat | Keyword "REPEAT" |
KeyWhile | Keyword "WHILE" |
KeyIf | Keyword "IF" |
KeyEnd | Keyword "END" |
KeyFor | Keyword "FOR" |
KeyReturn | Keyword "RETURN" |
KeyTry | Keyword "TRY" |