Skip to content

Commit

Permalink
add input
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaStev committed Nov 22, 2024
1 parent 4231c72 commit c31c520
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub enum TokenType {
IMPORT,
RETURN,
CONTINUE,
INPUT,
PRINT,
PRINTLN,
LOGICAL_AND, // &&
Expand Down Expand Up @@ -629,6 +630,11 @@ impl<'a> Lexer<'a> {
lexeme: "print".to_string(),
line: self.line,
},
"input" => Token {
token_type: TokenType::INPUT,
lexeme: "input".to_string(),
line: self.line,
},
"println" => Token {
token_type: TokenType::PRINTLN,
lexeme: "println".to_string(),
Expand Down

0 comments on commit c31c520

Please sign in to comment.