From 7436e444161c969c0af5904a782aee8370085408 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 21 Aug 2024 20:49:59 +0800 Subject: [PATCH] llcppg/ast:record type --- chore/llcppg/ast/ast.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/chore/llcppg/ast/ast.go b/chore/llcppg/ast/ast.go index 19f5ee4f..07673675 100644 --- a/chore/llcppg/ast/ast.go +++ b/chore/llcppg/ast/ast.go @@ -219,6 +219,14 @@ func (*FuncType) exprNode() {} // ------------------------------------------------ +type RecordType struct { + Tag Tag + Fields *FieldList + Methods []*FuncDecl +} + +// ------------------------------------------------ + // Template type InstantiationType struct { Template Expr @@ -285,10 +293,8 @@ func (*FuncDecl) declNode() {} // struct/union/class Name { Field1, Field2, ... }; type TypeDecl struct { DeclBase - Tag Tag - Name *Ident - Fields *FieldList - Methods []*FuncDecl + Name *Ident + Type *RecordType } func (*TypeDecl) declNode() {}