mirror of https://github.com/rui314/chibicc
This commit actually accept constexprs for enums
This commit is contained in:
parent
90d1f7f199
commit
16305b2b0f
2
parse.c
2
parse.c
|
@ -747,7 +747,7 @@ static bool consume_end(Token **rest, Token *tok) {
|
|||
// enum-specifier = ident? "{" enum-list? "}"
|
||||
// | ident ("{" enum-list? "}")?
|
||||
//
|
||||
// enum-list = ident ("=" num)? ("," ident ("=" num)?)* ","?
|
||||
// enum-list = ident ("=" const-expr)? ("," ident ("=" const-expr)?)* ","?
|
||||
static Type *enum_specifier(Token **rest, Token *tok) {
|
||||
Type *ty = enum_type();
|
||||
|
||||
|
|
Loading…
Reference in New Issue