parent
67cd6bb02f
commit
bf803eaf75
2 changed files with 126 additions and 2 deletions
@ -0,0 +1,70 @@ |
||||
pub enum Token { |
||||
ILLEGAL, |
||||
EOF, |
||||
IDENT(Vec<char>), |
||||
INT(Vec<char>), |
||||
ASSIGN(char), |
||||
PLUS(char), |
||||
COMMA(char), |
||||
SEMICOLON(char), |
||||
LPAREN(char), |
||||
RPAREN(char), |
||||
LBRACE(char), |
||||
RBRACE(char), |
||||
FUNCTION, |
||||
LET, |
||||
TRUE, |
||||
FALSE, |
||||
IF, |
||||
ELSE, |
||||
RETURN, |
||||
MINUS(char), |
||||
BANG(char), |
||||
ASTERISK(char), |
||||
SLASH(char), |
||||
LT(char), |
||||
GT(char) |
||||
} |
||||
|
||||
fn find_keyword(input: &str) { |
||||
match input { |
||||
"async" => {}, |
||||
"await" => {}, |
||||
"as" => {}, |
||||
"break" => {}, |
||||
"const" => {}, |
||||
"continue" => {}, |
||||
"crate" => {}, |
||||
"dyn" => {}, |
||||
"else" => {}, |
||||
"enum" => {}, |
||||
"extern" => {}, |
||||
"false" => {}, |
||||
"fn" => {}, |
||||
"for" => {}, |
||||
"if" => {}, |
||||
"impl" => {}, |
||||
"in" => {}, |
||||
"let" => {}, |
||||
"loop" => {}, |
||||
"match" => {}, |
||||
"mod" => {}, |
||||
"move" => {}, |
||||
"mut" => {}, |
||||
"pub" => {}, |
||||
"ref" => {}, |
||||
"return" => {}, |
||||
"self" => {}, |
||||
"Self" => {}, |
||||
"static" => {}, |
||||
"struct" => {}, |
||||
"super" => {}, |
||||
"trait" => {}, |
||||
"true" => {}, |
||||
"type" => {}, |
||||
"unsafe" => {}, |
||||
"use" => {}, |
||||
"where" => {}, |
||||
"while" => {}, |
||||
} |
||||
} |
||||
Loading…
Reference in new issue