function declarations

This commit is contained in:
2025-05-30 18:33:52 +02:00
parent 2bc24c394d
commit b3475651eb
5 changed files with 76 additions and 32 deletions

View File

@@ -34,6 +34,7 @@ pub enum TokenType {
KeywordIf,
KeywordElse,
KeywordWhile,
KeywordFunc,
Indent,
Dedent,
@@ -298,6 +299,7 @@ impl Tokenizer {
"if" => TokenType::KeywordIf,
"else" => TokenType::KeywordElse,
"while" => TokenType::KeywordWhile,
"func" => TokenType::KeywordFunc,
_ => TokenType::Identifier,
})
}