llcppg/ast:func decl

This commit is contained in:
luoliwoshang
2024-08-20 16:00:10 +08:00
parent 9053cbb90f
commit 8b86d07bfc

View File

@@ -43,6 +43,16 @@ type PPD interface { // preprocessing directive
ppdNode() ppdNode()
} }
// =============================================================================
type AccessSpecifier uint
const (
Invalid AccessSpecifier = iota
Public
Protected
Private
)
// ============================================================================= // =============================================================================
// Expressions (Types are also expressions) // Expressions (Types are also expressions)
@@ -274,8 +284,18 @@ func (*EnumTypeDecl) declNode() {}
// Ret Name(Params); // Ret Name(Params);
type FuncDecl struct { type FuncDecl struct {
DeclBase DeclBase
Name *Ident Name *Ident
Type *FuncType Type *FuncType
IsInline bool
IsStatic bool
// Class method specific fields
IsConst bool // const member function
IsExplicit bool // explicit constructor
IsConstructor bool
IsDestructor bool
IsVirtual bool
IsOverride bool
} }
func (*FuncDecl) declNode() {} func (*FuncDecl) declNode() {}