feat: Add support for if and compound statements.

This commit is contained in:
Jooris Hadeler
2026-01-15 21:38:07 +01:00
parent 10fd3b6abf
commit 6f19d38bf0
4 changed files with 50 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ pub enum TokenKind {
KwFn,
KwIf,
KwLet,
KwElse,
KwLoop,
KwWhile,
KwBreak,
@@ -183,6 +184,7 @@ impl<'src> Tokenizer<'src> {
"fn" => TokenKind::KwFn,
"if" => TokenKind::KwIf,
"let" => TokenKind::KwLet,
"else" => TokenKind::KwElse,
"loop" => TokenKind::KwLoop,
"while" => TokenKind::KwWhile,
"break" => TokenKind::KwBreak,