This commit is contained in:
agra
2026-03-03 16:18:58 +02:00
parent 23f444033a
commit 0336f361c7
7 changed files with 181 additions and 33 deletions

View File

@@ -964,8 +964,8 @@ pub const Parser = struct {
}
self.advance();
// Target type name
if (self.current.tag != .identifier) {
// Target type name (identifiers like s64, or keywords like f32/f64)
if (self.current.tag != .identifier and !self.current.tag.isTypeKeyword()) {
return self.fail("expected type name after 'for'");
}
const target_type = self.tokenSlice(self.current);