llcppg/ast:enum type

This commit is contained in:
luoliwoshang
2024-08-22 10:25:02 +08:00
parent 3c282e8cf9
commit 7c2f769a9a

View File

@@ -285,11 +285,17 @@ type EnumItem struct {
func (*EnumItem) exprNode() {} func (*EnumItem) exprNode() {}
type EnumType struct {
Items []*EnumItem
}
func (*EnumType) exprNode() {}
// enum Name { Item1, Item2, ... }; // enum Name { Item1, Item2, ... };
type EnumTypeDecl struct { type EnumTypeDecl struct {
DeclBase DeclBase
Name *Ident Name *Ident
Items []*EnumItem Type *EnumType
} }
func (*EnumTypeDecl) declNode() {} func (*EnumTypeDecl) declNode() {}