allow keywords as values in enums (and tagged unions)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user