@ -58,11 +58,11 @@ enum struct TypeKind
} ;
} ;
# define DECLARE_TYPE_KIND(kind) \
# define DECLARE_TYPE_KIND(kind) \
kind # # Type ( ) : CppSharp : : CppParser : : AST : : Type ( TypeKind : : kind ) { }
kind # # Type ( ) ;
struct CS_API Type
struct CS_API Type
{
{
Type ( TypeKind kind ) : Kind ( kind ) { }
Type ( TypeKind kind ) ;
TypeKind Kind ;
TypeKind Kind ;
bool IsDependent ;
bool IsDependent ;
} ;
} ;
@ -76,7 +76,7 @@ struct CS_API TypeQualifiers
struct CS_API QualifiedType
struct CS_API QualifiedType
{
{
QualifiedType ( ) : Type ( 0 ) { }
QualifiedType ( ) ;
CppSharp : : CppParser : : AST : : Type * Type ;
CppSharp : : CppParser : : AST : : Type * Type ;
TypeQualifiers Qualifiers ;
TypeQualifiers Qualifiers ;
} ;
} ;
@ -150,7 +150,7 @@ struct TypedefDecl;
struct CS_API TypedefType : public Type
struct CS_API TypedefType : public Type
{
{
TypedefType ( ) : Type ( TypeKind : : Typedef ) , Declaration ( 0 ) { }
TypedefType ( ) ;
TypedefDecl * Declaration ;
TypedefDecl * Declaration ;
} ;
} ;
@ -171,7 +171,7 @@ struct CS_API DecayedType : public Type
struct CS_API TemplateArgument
struct CS_API TemplateArgument
{
{
TemplateArgument ( ) : Declaration ( 0 ) { }
TemplateArgument ( ) ;
enum struct ArgumentKind
enum struct ArgumentKind
{
{
@ -195,8 +195,7 @@ struct Template;
struct CS_API TemplateSpecializationType : public Type
struct CS_API TemplateSpecializationType : public Type
{
{
TemplateSpecializationType ( ) : Type ( TypeKind : : TemplateSpecialization ) ,
TemplateSpecializationType ( ) ;
Template ( 0 ) , Desugared ( 0 ) { }
VECTOR ( TemplateArgument , Arguments )
VECTOR ( TemplateArgument , Arguments )
CppSharp : : CppParser : : AST : : Template * Template ;
CppSharp : : CppParser : : AST : : Template * Template ;
Type * Desugared ;
Type * Desugared ;
@ -228,8 +227,7 @@ struct Class;
struct CS_API InjectedClassNameType : public Type
struct CS_API InjectedClassNameType : public Type
{
{
InjectedClassNameType ( ) : Type ( TypeKind : : InjectedClassName ) ,
InjectedClassNameType ( ) ;
Class ( 0 ) { }
TemplateSpecializationType TemplateSpecialization ;
TemplateSpecializationType TemplateSpecialization ;
CppSharp : : CppParser : : AST : : Class * Class ;
CppSharp : : CppParser : : AST : : Class * Class ;
} ;
} ;
@ -284,6 +282,7 @@ struct FullComment;
struct CS_API RawComment
struct CS_API RawComment
{
{
RawComment ( ) ;
RawCommentKind Kind ;
RawCommentKind Kind ;
STRING ( Text )
STRING ( Text )
STRING ( BriefText )
STRING ( BriefText )
@ -306,7 +305,7 @@ enum struct VTableComponentKind
struct CS_API VTableComponent
struct CS_API VTableComponent
{
{
VTableComponent ( ) : Offset ( 0 ) , Declaration ( 0 ) { }
VTableComponent ( ) ;
VTableComponentKind Kind ;
VTableComponentKind Kind ;
unsigned Offset ;
unsigned Offset ;
CppSharp : : CppParser : : AST : : Declaration * Declaration ;
CppSharp : : CppParser : : AST : : Declaration * Declaration ;
@ -334,7 +333,7 @@ enum struct CppAbi
struct CS_API ClassLayout
struct CS_API ClassLayout
{
{
ClassLayout ( ) : ABI ( CppAbi : : Itanium ) { }
ClassLayout ( ) ;
CppAbi ABI ;
CppAbi ABI ;
VECTOR ( VFTableInfo , VFTables )
VECTOR ( VFTableInfo , VFTables )
VTableLayout Layout ;
VTableLayout Layout ;
@ -393,7 +392,7 @@ enum struct DeclarationKind
} ;
} ;
# define DECLARE_DECL_KIND(klass, kind) \
# define DECLARE_DECL_KIND(klass, kind) \
klass ( ) : Declaration ( DeclarationKind : : kind ) { }
klass ( ) ;
struct CS_API Declaration
struct CS_API Declaration
{
{
@ -465,8 +464,7 @@ struct CS_API TypedefDecl : public Declaration
struct CS_API Parameter : public Declaration
struct CS_API Parameter : public Declaration
{
{
Parameter ( ) : Declaration ( DeclarationKind : : Parameter ) ,
Parameter ( ) ;
IsIndirect ( false ) , HasDefaultValue ( false ) { }
CppSharp : : CppParser : : AST : : QualifiedType QualifiedType ;
CppSharp : : CppParser : : AST : : QualifiedType QualifiedType ;
bool IsIndirect ;
bool IsIndirect ;
@ -533,8 +531,7 @@ enum struct CXXOperatorKind
struct CS_API Function : public Declaration
struct CS_API Function : public Declaration
{
{
Function ( ) : Declaration ( DeclarationKind : : Function ) ,
Function ( ) ;
IsReturnIndirect ( false ) { }
QualifiedType ReturnType ;
QualifiedType ReturnType ;
bool IsReturnIndirect ;
bool IsReturnIndirect ;
@ -554,8 +551,7 @@ struct AccessSpecifierDecl;
struct CS_API Method : public Function
struct CS_API Method : public Function
{
{
Method ( ) : IsDefaultConstructor ( false ) , IsCopyConstructor ( false ) ,
Method ( ) ;
IsMoveConstructor ( false ) { Kind = DeclarationKind : : Method ; }
AccessSpecifierDecl * AccessDecl ;
AccessSpecifierDecl * AccessDecl ;
@ -608,6 +604,7 @@ struct CS_API Variable : public Declaration
struct CS_API BaseClassSpecifier
struct CS_API BaseClassSpecifier
{
{
BaseClassSpecifier ( ) ;
AccessSpecifier Access ;
AccessSpecifier Access ;
bool IsVirtual ;
bool IsVirtual ;
CppSharp : : CppParser : : AST : : Type * Type ;
CppSharp : : CppParser : : AST : : Type * Type ;
@ -631,7 +628,7 @@ struct CS_API AccessSpecifierDecl : public Declaration
struct CS_API Class : public DeclarationContext
struct CS_API Class : public DeclarationContext
{
{
Class ( ) { Kind = DeclarationKind : : Class ; }
Class ( ) ;
VECTOR ( BaseClassSpecifier * , Bases )
VECTOR ( BaseClassSpecifier * , Bases )
VECTOR ( Field * , Fields )
VECTOR ( Field * , Fields )
@ -662,7 +659,7 @@ struct ClassTemplatePartialSpecialization;
struct CS_API ClassTemplate : public Template
struct CS_API ClassTemplate : public Template
{
{
ClassTemplate ( ) { Kind = DeclarationKind : : ClassTemplate ; }
ClassTemplate ( ) ;
VECTOR ( ClassTemplateSpecialization * , Specializations )
VECTOR ( ClassTemplateSpecialization * , Specializations )
ClassTemplateSpecialization * FindSpecialization ( void * ptr ) ;
ClassTemplateSpecialization * FindSpecialization ( void * ptr ) ;
ClassTemplateSpecialization * FindSpecialization ( TemplateSpecializationType type ) ;
ClassTemplateSpecialization * FindSpecialization ( TemplateSpecializationType type ) ;
@ -681,8 +678,7 @@ enum struct TemplateSpecializationKind
struct CS_API ClassTemplateSpecialization : public Class
struct CS_API ClassTemplateSpecialization : public Class
{
{
ClassTemplateSpecialization ( ) {
ClassTemplateSpecialization ( ) ;
Kind = DeclarationKind : : ClassTemplateSpecialization ; }
ClassTemplate * TemplatedDecl ;
ClassTemplate * TemplatedDecl ;
VECTOR ( TemplateArgument , Arguments )
VECTOR ( TemplateArgument , Arguments )
TemplateSpecializationKind SpecializationKind ;
TemplateSpecializationKind SpecializationKind ;
@ -690,44 +686,41 @@ struct CS_API ClassTemplateSpecialization : public Class
struct CS_API ClassTemplatePartialSpecialization : public ClassTemplateSpecialization
struct CS_API ClassTemplatePartialSpecialization : public ClassTemplateSpecialization
{
{
ClassTemplatePartialSpecialization ( ) { Kind =
ClassTemplatePartialSpecialization ( ) ;
DeclarationKind : : ClassTemplatePartialSpecialization ; }
} ;
} ;
struct CS_API FunctionTemplate : public Template
struct CS_API FunctionTemplate : public Template
{
{
FunctionTemplate ( ) { Kind = DeclarationKind : : FunctionTemplate ; }
FunctionTemplate ( ) ;
} ;
} ;
struct CS_API Namespace : public DeclarationContext
struct CS_API Namespace : public DeclarationContext
{
{
Namespace ( ) { Kind = DeclarationKind : : Namespace ; }
Namespace ( ) ;
} ;
} ;
struct CS_API PreprocessedEntity : public Declaration
struct CS_API PreprocessedEntity : public Declaration
{
{
PreprocessedEntity ( ) : Declaration ( DeclarationKind : : PreprocessedEntity ) ,
PreprocessedEntity ( ) ;
Location ( MacroLocation : : Unknown ) { }
MacroLocation Location ;
MacroLocation Location ;
} ;
} ;
struct CS_API MacroDefinition : public PreprocessedEntity
struct CS_API MacroDefinition : public PreprocessedEntity
{
{
MacroDefinition ( ) { Kind = DeclarationKind : : MacroDefinition ; }
MacroDefinition ( ) ;
STRING ( Expression )
STRING ( Expression )
} ;
} ;
struct CS_API MacroExpansion : public PreprocessedEntity
struct CS_API MacroExpansion : public PreprocessedEntity
{
{
MacroExpansion ( ) { Kind = DeclarationKind : : MacroExpansion ; }
MacroExpansion ( ) ;
STRING ( Text )
STRING ( Text )
MacroDefinition * Definition ;
MacroDefinition * Definition ;
} ;
} ;
struct CS_API TranslationUnit : public Namespace
struct CS_API TranslationUnit : public Namespace
{
{
TranslationUnit ( ) { Kind = DeclarationKind : : TranslationUnit ; }
TranslationUnit ( ) ;
STRING ( FileName )
STRING ( FileName )
bool IsSystemHeader ;
bool IsSystemHeader ;
VECTOR ( MacroDefinition * , Macros )
VECTOR ( MacroDefinition * , Macros )