Skip to content

Commit

Permalink
Make the parser abuse the fact that the container keyword tokens are …
Browse files Browse the repository at this point in the history
…grouped
  • Loading branch information
N00byEdge committed Oct 8, 2023
1 parent 34a99fb commit e4cec2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfhost/parser.n
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ fn parse_primary_expression(context: *ParserContext, require: bool, precedence:
else if(p == .unreachable_keyword) {
return context.add_advance(.@"unreachable");
}
else if(p == .struct_keyword || p == .union_keyword || p == .enum_keyword) {
else if(.enum_keyword <= p && p <= .union_keyword) {
const token = context.advance();
var is_enum = false;
// TODO: Make == a proper value so that we don't have to do this shit
Expand Down

0 comments on commit e4cec2d

Please sign in to comment.