allow keywords as values in enums (and tagged unions)

This commit is contained in:
2026-07-13 17:51:59 +02:00
parent de56dc7315
commit 5a958d9bfd
5 changed files with 156 additions and 18 deletions
+6 -1
View File
@@ -114,6 +114,10 @@ Kind :: enum u8 {
Keyword_C_Longdouble,
}
is_keyword :: proc(kind: Kind) -> bool {
return kind >= .Keyword_Func && kind <= .Keyword_C_Longdouble
}
Token :: struct {
span: source.Span,
symbol: symbol.Id,
@@ -122,5 +126,6 @@ Token :: struct {
}
Stream :: struct {
items: [dynamic]Token,
items: [dynamic]Token,
symbols: ^symbol.Table,
}