while loops
This commit is contained in:
@@ -26,6 +26,7 @@ keyword_kind :: proc(text: string) -> token.Kind {
|
||||
case "and": return .Keyword_And
|
||||
case "or": return .Keyword_Or
|
||||
case "if": return .Keyword_If
|
||||
case "while": return .Keyword_While
|
||||
case "else": return .Keyword_Else
|
||||
case "true": return .Keyword_True
|
||||
case "false": return .Keyword_False
|
||||
@@ -109,8 +110,7 @@ lex :: proc(
|
||||
cursor += 1
|
||||
append_token(&stream, source_file, .Colon_Colon, start, cursor)
|
||||
} else {
|
||||
id := source.add(diagnostics, source.Span{file=source_file.id, start=source.Offset(start), end=source.Offset(cursor)}, "expected a second ':'")
|
||||
append_token(&stream, source_file, .Invalid, start, cursor, diagnostic=id)
|
||||
append_token(&stream, source_file, .Colon, start, cursor)
|
||||
}
|
||||
case '=':
|
||||
start := cursor
|
||||
|
||||
Reference in New Issue
Block a user