for loops

This commit is contained in:
2026-06-22 20:11:18 +02:00
parent 380b5943b3
commit 27f42dd253
15 changed files with 1369 additions and 22 deletions
+4
View File
@@ -27,6 +27,7 @@ keyword_kind :: proc(text: string) -> token.Kind {
case "or": return .Keyword_Or
case "if": return .Keyword_If
case "while": return .Keyword_While
case "for": return .Keyword_For
case "else": return .Keyword_Else
case "true": return .Keyword_True
case "false": return .Keyword_False
@@ -162,6 +163,9 @@ lex :: proc(
if cursor < len(bytes) && bytes[cursor] == '.' {
cursor += 1
append_token(&stream, source_file, .Ellipsis, start, cursor)
} else if cursor < len(bytes) && bytes[cursor] == '=' {
cursor += 1
append_token(&stream, source_file, .Range_Inclusive, start, cursor)
} else {
append_token(&stream, source_file, .Range, start, cursor)
}