From 7c2f769a9a7c0a7aca3e4f84725858f4fca1289b Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Thu, 22 Aug 2024 10:25:02 +0800 Subject: [PATCH] llcppg/ast:enum type --- chore/llcppg/ast/ast.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/chore/llcppg/ast/ast.go b/chore/llcppg/ast/ast.go index ee5cb725..a6138b7c 100644 --- a/chore/llcppg/ast/ast.go +++ b/chore/llcppg/ast/ast.go @@ -285,11 +285,17 @@ type EnumItem struct { func (*EnumItem) exprNode() {} +type EnumType struct { + Items []*EnumItem +} + +func (*EnumType) exprNode() {} + // enum Name { Item1, Item2, ... }; type EnumTypeDecl struct { DeclBase - Name *Ident - Items []*EnumItem + Name *Ident + Type *EnumType } func (*EnumTypeDecl) declNode() {}