for loops
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user