break and continue

This commit is contained in:
2025-07-02 13:56:30 +02:00
parent a0bee3f5ca
commit c53a7cd631
7 changed files with 48 additions and 16 deletions

View File

@@ -43,6 +43,8 @@ pub enum TokenType {
KeywordIn,
KeywordFunc,
KeywordReturn,
KeywordBreak,
KeywordContinue,
Indent,
Dedent,
@@ -335,6 +337,8 @@ impl Tokenizer {
"in" => TokenType::KeywordIn,
"func" => TokenType::KeywordFunc,
"return" => TokenType::KeywordReturn,
"break" => TokenType::KeywordBreak,
"continue" => TokenType::KeywordContinue,
"true" => TokenType::True,
"false" => TokenType::False,
_ => TokenType::Identifier,