|
|
@ -57,10 +57,10 @@ static std::vector<T> split(const T & str, const T & delimiters) { |
|
|
|
|
|
|
|
|
|
|
|
namespace CppSharp { namespace CppParser { namespace AST { |
|
|
|
namespace CppSharp { namespace CppParser { namespace AST { |
|
|
|
|
|
|
|
|
|
|
|
Type::Type(TypeKind kind) : Kind(kind) {} |
|
|
|
Type::Type(TypeKind kind) : kind(kind) {} |
|
|
|
Type::Type(const Type& rhs) : Kind(rhs.Kind), IsDependent(rhs.IsDependent) {} |
|
|
|
Type::Type(const Type& rhs) : kind(rhs.kind), isDependent(rhs.isDependent) {} |
|
|
|
|
|
|
|
|
|
|
|
QualifiedType::QualifiedType() : Type(0) {} |
|
|
|
QualifiedType::QualifiedType() : type(0) {} |
|
|
|
|
|
|
|
|
|
|
|
TagType::TagType() : Type(TypeKind::Tag) {} |
|
|
|
TagType::TagType() : Type(TypeKind::Tag) {} |
|
|
|
|
|
|
|
|
|
|
@ -76,7 +76,7 @@ PointerType::PointerType() : Type(TypeKind::Pointer) {} |
|
|
|
|
|
|
|
|
|
|
|
MemberPointerType::MemberPointerType() : Type(TypeKind::MemberPointer) {} |
|
|
|
MemberPointerType::MemberPointerType() : Type(TypeKind::MemberPointer) {} |
|
|
|
|
|
|
|
|
|
|
|
TypedefType::TypedefType() : Type(TypeKind::Typedef), Declaration(0) {} |
|
|
|
TypedefType::TypedefType() : Type(TypeKind::Typedef), declaration(0) {} |
|
|
|
|
|
|
|
|
|
|
|
AttributedType::AttributedType() : Type(TypeKind::Attributed) {} |
|
|
|
AttributedType::AttributedType() : Type(TypeKind::Attributed) {} |
|
|
|
|
|
|
|
|
|
|
@ -85,9 +85,9 @@ DecayedType::DecayedType() : Type(TypeKind::Decayed) {} |
|
|
|
// Template
|
|
|
|
// Template
|
|
|
|
TemplateParameter::TemplateParameter(DeclarationKind kind) |
|
|
|
TemplateParameter::TemplateParameter(DeclarationKind kind) |
|
|
|
: Declaration(kind) |
|
|
|
: Declaration(kind) |
|
|
|
, Depth(0) |
|
|
|
, depth(0) |
|
|
|
, Index(0) |
|
|
|
, index(0) |
|
|
|
, IsParameterPack(false) |
|
|
|
, isParameterPack(false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -97,9 +97,9 @@ TemplateParameter::~TemplateParameter() |
|
|
|
|
|
|
|
|
|
|
|
TemplateTemplateParameter::TemplateTemplateParameter() |
|
|
|
TemplateTemplateParameter::TemplateTemplateParameter() |
|
|
|
: Template(DeclarationKind::TemplateTemplateParm) |
|
|
|
: Template(DeclarationKind::TemplateTemplateParm) |
|
|
|
, IsParameterPack(false) |
|
|
|
, isParameterPack(false) |
|
|
|
, IsPackExpansion(false) |
|
|
|
, isPackExpansion(false) |
|
|
|
, IsExpandedParameterPack(false) |
|
|
|
, isExpandedParameterPack(false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -114,8 +114,8 @@ TypeTemplateParameter::TypeTemplateParameter() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TypeTemplateParameter::TypeTemplateParameter(const TypeTemplateParameter& rhs) |
|
|
|
TypeTemplateParameter::TypeTemplateParameter(const TypeTemplateParameter& rhs) |
|
|
|
: TemplateParameter(rhs.Kind) |
|
|
|
: TemplateParameter(rhs.kind) |
|
|
|
, DefaultArgument(rhs.DefaultArgument) |
|
|
|
, defaultArgument(rhs.defaultArgument) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -123,32 +123,32 @@ TypeTemplateParameter::~TypeTemplateParameter() {} |
|
|
|
|
|
|
|
|
|
|
|
NonTypeTemplateParameter::NonTypeTemplateParameter() |
|
|
|
NonTypeTemplateParameter::NonTypeTemplateParameter() |
|
|
|
: TemplateParameter(DeclarationKind::NonTypeTemplateParm) |
|
|
|
: TemplateParameter(DeclarationKind::NonTypeTemplateParm) |
|
|
|
, DefaultArgument(0) |
|
|
|
, defaultArgument(0) |
|
|
|
, Position(0) |
|
|
|
, position(0) |
|
|
|
, IsPackExpansion(false) |
|
|
|
, isPackExpansion(false) |
|
|
|
, IsExpandedParameterPack(false) |
|
|
|
, isExpandedParameterPack(false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
NonTypeTemplateParameter::NonTypeTemplateParameter(const NonTypeTemplateParameter& rhs) |
|
|
|
NonTypeTemplateParameter::NonTypeTemplateParameter(const NonTypeTemplateParameter& rhs) |
|
|
|
: TemplateParameter(rhs.Kind) |
|
|
|
: TemplateParameter(rhs.kind) |
|
|
|
, DefaultArgument(rhs.DefaultArgument) |
|
|
|
, defaultArgument(rhs.defaultArgument) |
|
|
|
, Position(rhs.Position) |
|
|
|
, position(rhs.position) |
|
|
|
, IsPackExpansion(rhs.IsPackExpansion) |
|
|
|
, isPackExpansion(rhs.isPackExpansion) |
|
|
|
, IsExpandedParameterPack(rhs.IsExpandedParameterPack) |
|
|
|
, isExpandedParameterPack(rhs.isExpandedParameterPack) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
NonTypeTemplateParameter::~NonTypeTemplateParameter() {} |
|
|
|
NonTypeTemplateParameter::~NonTypeTemplateParameter() {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateArgument::TemplateArgument() : Declaration(0), Integral(0) {} |
|
|
|
TemplateArgument::TemplateArgument() : declaration(0), integral(0) {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateSpecializationType::TemplateSpecializationType() |
|
|
|
TemplateSpecializationType::TemplateSpecializationType() |
|
|
|
: Type(TypeKind::TemplateSpecialization), Template(0) {} |
|
|
|
: Type(TypeKind::TemplateSpecialization), _template(0) {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateSpecializationType::TemplateSpecializationType( |
|
|
|
TemplateSpecializationType::TemplateSpecializationType( |
|
|
|
const TemplateSpecializationType& rhs) : Type(rhs), |
|
|
|
const TemplateSpecializationType& rhs) : Type(rhs), |
|
|
|
Arguments(rhs.Arguments), Template(rhs.Template), Desugared(rhs.Desugared) {} |
|
|
|
Arguments(rhs.Arguments), _template(rhs._template), desugared(rhs.desugared) {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateSpecializationType::~TemplateSpecializationType() {} |
|
|
|
TemplateSpecializationType::~TemplateSpecializationType() {} |
|
|
|
|
|
|
|
|
|
|
@ -159,22 +159,22 @@ DependentTemplateSpecializationType::DependentTemplateSpecializationType() |
|
|
|
|
|
|
|
|
|
|
|
DependentTemplateSpecializationType::DependentTemplateSpecializationType( |
|
|
|
DependentTemplateSpecializationType::DependentTemplateSpecializationType( |
|
|
|
const DependentTemplateSpecializationType& rhs) : Type(rhs), |
|
|
|
const DependentTemplateSpecializationType& rhs) : Type(rhs), |
|
|
|
Arguments(rhs.Arguments), Desugared(rhs.Desugared) {} |
|
|
|
Arguments(rhs.Arguments), desugared(rhs.desugared) {} |
|
|
|
|
|
|
|
|
|
|
|
DependentTemplateSpecializationType::~DependentTemplateSpecializationType() {} |
|
|
|
DependentTemplateSpecializationType::~DependentTemplateSpecializationType() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(DependentTemplateSpecializationType, TemplateArgument, Arguments) |
|
|
|
DEF_VECTOR(DependentTemplateSpecializationType, TemplateArgument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
TemplateParameterType::TemplateParameterType() : Type(TypeKind::TemplateParameter), Parameter(0) {} |
|
|
|
TemplateParameterType::TemplateParameterType() : Type(TypeKind::TemplateParameter), parameter(0) {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateParameterType::~TemplateParameterType() {} |
|
|
|
TemplateParameterType::~TemplateParameterType() {} |
|
|
|
|
|
|
|
|
|
|
|
TemplateParameterSubstitutionType::TemplateParameterSubstitutionType() |
|
|
|
TemplateParameterSubstitutionType::TemplateParameterSubstitutionType() |
|
|
|
: Type(TypeKind::TemplateParameterSubstitution), ReplacedParameter(0) {} |
|
|
|
: Type(TypeKind::TemplateParameterSubstitution), replacedParameter(0) {} |
|
|
|
|
|
|
|
|
|
|
|
InjectedClassNameType::InjectedClassNameType() |
|
|
|
InjectedClassNameType::InjectedClassNameType() |
|
|
|
: Type(TypeKind::InjectedClassName) |
|
|
|
: Type(TypeKind::InjectedClassName) |
|
|
|
, Class(0) |
|
|
|
, _class(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -184,11 +184,11 @@ PackExpansionType::PackExpansionType() : Type(TypeKind::PackExpansion) {} |
|
|
|
|
|
|
|
|
|
|
|
UnaryTransformType::UnaryTransformType() : Type(TypeKind::UnaryTransform) {} |
|
|
|
UnaryTransformType::UnaryTransformType() : Type(TypeKind::UnaryTransform) {} |
|
|
|
|
|
|
|
|
|
|
|
VectorType::VectorType() : Type(TypeKind::Vector), NumElements(0) {} |
|
|
|
VectorType::VectorType() : Type(TypeKind::Vector), numElements(0) {} |
|
|
|
|
|
|
|
|
|
|
|
BuiltinType::BuiltinType() : CppSharp::CppParser::AST::Type(TypeKind::Builtin) {} |
|
|
|
BuiltinType::BuiltinType() : CppSharp::CppParser::AST::Type(TypeKind::Builtin) {} |
|
|
|
|
|
|
|
|
|
|
|
VTableComponent::VTableComponent() : Offset(0), Declaration(0) {} |
|
|
|
VTableComponent::VTableComponent() : offset(0), declaration(0) {} |
|
|
|
|
|
|
|
|
|
|
|
// VTableLayout
|
|
|
|
// VTableLayout
|
|
|
|
VTableLayout::VTableLayout() {} |
|
|
|
VTableLayout::VTableLayout() {} |
|
|
@ -200,15 +200,15 @@ DEF_VECTOR(VTableLayout, VTableComponent, Components) |
|
|
|
VFTableInfo::VFTableInfo() : VBTableIndex(0), VFPtrOffset(0), VFPtrFullOffset(0) {} |
|
|
|
VFTableInfo::VFTableInfo() : VBTableIndex(0), VFPtrOffset(0), VFPtrFullOffset(0) {} |
|
|
|
VFTableInfo::VFTableInfo(const VFTableInfo& rhs) : VBTableIndex(rhs.VBTableIndex), |
|
|
|
VFTableInfo::VFTableInfo(const VFTableInfo& rhs) : VBTableIndex(rhs.VBTableIndex), |
|
|
|
VFPtrOffset(rhs.VFPtrOffset), VFPtrFullOffset(rhs.VFPtrFullOffset), |
|
|
|
VFPtrOffset(rhs.VFPtrOffset), VFPtrFullOffset(rhs.VFPtrFullOffset), |
|
|
|
Layout(rhs.Layout) {} |
|
|
|
layout(rhs.layout) {} |
|
|
|
|
|
|
|
|
|
|
|
LayoutField::LayoutField() : Offset(0), FieldPtr(0) {} |
|
|
|
LayoutField::LayoutField() : offset(0), fieldPtr(0) {} |
|
|
|
|
|
|
|
|
|
|
|
LayoutField::LayoutField(const LayoutField & other) |
|
|
|
LayoutField::LayoutField(const LayoutField & other) |
|
|
|
: Offset(other.Offset) |
|
|
|
: offset(other.offset) |
|
|
|
, Name(other.Name) |
|
|
|
, Name(other.Name) |
|
|
|
, QualifiedType(other.QualifiedType) |
|
|
|
, qualifiedType(other.qualifiedType) |
|
|
|
, FieldPtr(other.FieldPtr) |
|
|
|
, fieldPtr(other.fieldPtr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -216,14 +216,14 @@ LayoutField::~LayoutField() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(LayoutField, Name) |
|
|
|
DEF_STRING(LayoutField, Name) |
|
|
|
|
|
|
|
|
|
|
|
LayoutBase::LayoutBase() : Offset(0), Class(0) {} |
|
|
|
LayoutBase::LayoutBase() : offset(0), _class(0) {} |
|
|
|
|
|
|
|
|
|
|
|
LayoutBase::LayoutBase(const LayoutBase& other) : Offset(other.Offset), Class(other.Class) {} |
|
|
|
LayoutBase::LayoutBase(const LayoutBase& other) : offset(other.offset), _class(other._class) {} |
|
|
|
|
|
|
|
|
|
|
|
LayoutBase::~LayoutBase() {} |
|
|
|
LayoutBase::~LayoutBase() {} |
|
|
|
|
|
|
|
|
|
|
|
ClassLayout::ClassLayout() : ABI(CppAbi::Itanium), HasOwnVFPtr(false), |
|
|
|
ClassLayout::ClassLayout() : ABI(CppAbi::Itanium), hasOwnVFPtr(false), |
|
|
|
VBPtrOffset(0), Alignment(0), Size(0), DataSize(0) {} |
|
|
|
VBPtrOffset(0), alignment(0), size(0), dataSize(0) {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(ClassLayout, VFTableInfo, VFTables) |
|
|
|
DEF_VECTOR(ClassLayout, VFTableInfo, VFTables) |
|
|
|
|
|
|
|
|
|
|
@ -232,39 +232,39 @@ DEF_VECTOR(ClassLayout, LayoutField, Fields) |
|
|
|
DEF_VECTOR(ClassLayout, LayoutBase, Bases) |
|
|
|
DEF_VECTOR(ClassLayout, LayoutBase, Bases) |
|
|
|
|
|
|
|
|
|
|
|
Declaration::Declaration(DeclarationKind kind) |
|
|
|
Declaration::Declaration(DeclarationKind kind) |
|
|
|
: Kind(kind) |
|
|
|
: kind(kind) |
|
|
|
, Access(AccessSpecifier::Public) |
|
|
|
, access(AccessSpecifier::Public) |
|
|
|
, _Namespace(0) |
|
|
|
, _namespace(0) |
|
|
|
, Location(0) |
|
|
|
, location(0) |
|
|
|
, LineNumberStart(0) |
|
|
|
, lineNumberStart(0) |
|
|
|
, LineNumberEnd(0) |
|
|
|
, lineNumberEnd(0) |
|
|
|
, Comment(0) |
|
|
|
, comment(0) |
|
|
|
, IsIncomplete(false) |
|
|
|
, isIncomplete(false) |
|
|
|
, IsDependent(false) |
|
|
|
, isDependent(false) |
|
|
|
, IsImplicit(false) |
|
|
|
, isImplicit(false) |
|
|
|
, CompleteDeclaration(0) |
|
|
|
, completeDeclaration(0) |
|
|
|
, DefinitionOrder(0) |
|
|
|
, definitionOrder(0) |
|
|
|
, OriginalPtr(0) |
|
|
|
, originalPtr(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Declaration::Declaration(const Declaration& rhs) |
|
|
|
Declaration::Declaration(const Declaration& rhs) |
|
|
|
: Kind(rhs.Kind) |
|
|
|
: kind(rhs.kind) |
|
|
|
, Access(rhs.Access) |
|
|
|
, access(rhs.access) |
|
|
|
, _Namespace(rhs._Namespace) |
|
|
|
, _namespace(rhs._namespace) |
|
|
|
, Location(rhs.Location.ID) |
|
|
|
, location(rhs.location.ID) |
|
|
|
, LineNumberStart(rhs.LineNumberStart) |
|
|
|
, lineNumberStart(rhs.lineNumberStart) |
|
|
|
, LineNumberEnd(rhs.LineNumberEnd) |
|
|
|
, lineNumberEnd(rhs.lineNumberEnd) |
|
|
|
, Name(rhs.Name) |
|
|
|
, Name(rhs.Name) |
|
|
|
, Comment(rhs.Comment) |
|
|
|
, comment(rhs.comment) |
|
|
|
, DebugText(rhs.DebugText) |
|
|
|
, DebugText(rhs.DebugText) |
|
|
|
, IsIncomplete(rhs.IsIncomplete) |
|
|
|
, isIncomplete(rhs.isIncomplete) |
|
|
|
, IsDependent(rhs.IsDependent) |
|
|
|
, isDependent(rhs.isDependent) |
|
|
|
, IsImplicit(rhs.IsImplicit) |
|
|
|
, isImplicit(rhs.isImplicit) |
|
|
|
, CompleteDeclaration(rhs.CompleteDeclaration) |
|
|
|
, completeDeclaration(rhs.completeDeclaration) |
|
|
|
, DefinitionOrder(rhs.DefinitionOrder) |
|
|
|
, definitionOrder(rhs.definitionOrder) |
|
|
|
, PreprocessedEntities(rhs.PreprocessedEntities) |
|
|
|
, PreprocessedEntities(rhs.PreprocessedEntities) |
|
|
|
, OriginalPtr(rhs.OriginalPtr) |
|
|
|
, originalPtr(rhs.originalPtr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -279,7 +279,7 @@ DEF_VECTOR(Declaration, PreprocessedEntity*, PreprocessedEntities) |
|
|
|
|
|
|
|
|
|
|
|
DeclarationContext::DeclarationContext(DeclarationKind kind) |
|
|
|
DeclarationContext::DeclarationContext(DeclarationKind kind) |
|
|
|
: Declaration(kind) |
|
|
|
: Declaration(kind) |
|
|
|
, IsAnonymous(false) |
|
|
|
, isAnonymous(false) |
|
|
|
{} |
|
|
|
{} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(DeclarationContext, Namespace*, Namespaces) |
|
|
|
DEF_VECTOR(DeclarationContext, Namespace*, Namespaces) |
|
|
@ -294,8 +294,8 @@ DEF_VECTOR(DeclarationContext, Friend*, Friends) |
|
|
|
|
|
|
|
|
|
|
|
Declaration* DeclarationContext::FindAnonymous(const std::string& key) |
|
|
|
Declaration* DeclarationContext::FindAnonymous(const std::string& key) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto it = Anonymous.find(key); |
|
|
|
auto it = anonymous.find(key); |
|
|
|
return (it != Anonymous.end()) ? it->second : 0; |
|
|
|
return (it != anonymous.end()) ? it->second : 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Namespace* DeclarationContext::FindNamespace(const std::string& Name) |
|
|
|
Namespace* DeclarationContext::FindNamespace(const std::string& Name) |
|
|
@ -335,7 +335,7 @@ Namespace* DeclarationContext::FindCreateNamespace(const std::string& Name) |
|
|
|
{ |
|
|
|
{ |
|
|
|
_namespace = new Namespace(); |
|
|
|
_namespace = new Namespace(); |
|
|
|
_namespace->Name = Name; |
|
|
|
_namespace->Name = Name; |
|
|
|
_namespace->_Namespace = this; |
|
|
|
_namespace->_namespace = this; |
|
|
|
|
|
|
|
|
|
|
|
Namespaces.push_back(_namespace); |
|
|
|
Namespaces.push_back(_namespace); |
|
|
|
} |
|
|
|
} |
|
|
@ -353,7 +353,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto _class = std::find_if(Classes.begin(), Classes.end(), |
|
|
|
auto _class = std::find_if(Classes.begin(), Classes.end(), |
|
|
|
[&](Class* klass) { return klass->Name == Name && |
|
|
|
[&](Class* klass) { return klass->Name == Name && |
|
|
|
(!klass->IsIncomplete || !IsComplete); }); |
|
|
|
(!klass->isIncomplete || !IsComplete); }); |
|
|
|
|
|
|
|
|
|
|
|
return _class != Classes.end() ? *_class : nullptr; |
|
|
|
return _class != Classes.end() ? *_class : nullptr; |
|
|
|
} |
|
|
|
} |
|
|
@ -374,8 +374,8 @@ Class* DeclarationContext::CreateClass(std::string Name, bool IsComplete) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto _class = new Class(); |
|
|
|
auto _class = new Class(); |
|
|
|
_class->Name = Name; |
|
|
|
_class->Name = Name; |
|
|
|
_class->_Namespace = this; |
|
|
|
_class->_namespace = this; |
|
|
|
_class->IsIncomplete = !IsComplete; |
|
|
|
_class->isIncomplete = !IsComplete; |
|
|
|
|
|
|
|
|
|
|
|
return _class; |
|
|
|
return _class; |
|
|
|
} |
|
|
|
} |
|
|
@ -402,7 +402,7 @@ Class* DeclarationContext::FindClass(const std::string& Name, bool IsComplete, |
|
|
|
Enumeration* DeclarationContext::FindEnum(const void* OriginalPtr) |
|
|
|
Enumeration* DeclarationContext::FindEnum(const void* OriginalPtr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundEnum = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
auto foundEnum = std::find_if(Enums.begin(), Enums.end(), |
|
|
|
[&](Enumeration* enumeration) { return enumeration->OriginalPtr == OriginalPtr; }); |
|
|
|
[&](Enumeration* enumeration) { return enumeration->originalPtr == OriginalPtr; }); |
|
|
|
|
|
|
|
|
|
|
|
if (foundEnum != Enums.end()) |
|
|
|
if (foundEnum != Enums.end()) |
|
|
|
return *foundEnum; |
|
|
|
return *foundEnum; |
|
|
@ -427,7 +427,7 @@ Enumeration* DeclarationContext::FindEnum(const std::string& Name, bool Create) |
|
|
|
|
|
|
|
|
|
|
|
auto _enum = new Enumeration(); |
|
|
|
auto _enum = new Enumeration(); |
|
|
|
_enum->Name = Name; |
|
|
|
_enum->Name = Name; |
|
|
|
_enum->_Namespace = this; |
|
|
|
_enum->_namespace = this; |
|
|
|
Enums.push_back(_enum); |
|
|
|
Enums.push_back(_enum); |
|
|
|
return _enum; |
|
|
|
return _enum; |
|
|
|
} |
|
|
|
} |
|
|
@ -495,7 +495,7 @@ TypedefDecl* DeclarationContext::FindTypedef(const std::string& Name, bool Creat |
|
|
|
|
|
|
|
|
|
|
|
auto tdef = new TypedefDecl(); |
|
|
|
auto tdef = new TypedefDecl(); |
|
|
|
tdef->Name = Name; |
|
|
|
tdef->Name = Name; |
|
|
|
tdef->_Namespace = this; |
|
|
|
tdef->_namespace = this; |
|
|
|
|
|
|
|
|
|
|
|
return tdef; |
|
|
|
return tdef; |
|
|
|
} |
|
|
|
} |
|
|
@ -513,7 +513,7 @@ TypeAlias* DeclarationContext::FindTypeAlias(const std::string& Name, bool Creat |
|
|
|
|
|
|
|
|
|
|
|
auto talias = new TypeAlias(); |
|
|
|
auto talias = new TypeAlias(); |
|
|
|
talias->Name = Name; |
|
|
|
talias->Name = Name; |
|
|
|
talias->_Namespace = this; |
|
|
|
talias->_namespace = this; |
|
|
|
|
|
|
|
|
|
|
|
return talias; |
|
|
|
return talias; |
|
|
|
} |
|
|
|
} |
|
|
@ -548,17 +548,17 @@ TypedefDecl::TypedefDecl() : TypedefNameDecl(DeclarationKind::Typedef) {} |
|
|
|
|
|
|
|
|
|
|
|
TypedefDecl::~TypedefDecl() {} |
|
|
|
TypedefDecl::~TypedefDecl() {} |
|
|
|
|
|
|
|
|
|
|
|
TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), DescribedAliasTemplate(0) {} |
|
|
|
TypeAlias::TypeAlias() : TypedefNameDecl(DeclarationKind::TypeAlias), describedAliasTemplate(0) {} |
|
|
|
|
|
|
|
|
|
|
|
TypeAlias::~TypeAlias() {} |
|
|
|
TypeAlias::~TypeAlias() {} |
|
|
|
|
|
|
|
|
|
|
|
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), Declaration(0) {} |
|
|
|
Friend::Friend() : CppSharp::CppParser::AST::Declaration(DeclarationKind::Friend), declaration(0) {} |
|
|
|
|
|
|
|
|
|
|
|
Friend::~Friend() {} |
|
|
|
Friend::~Friend() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(Statement, String) |
|
|
|
DEF_STRING(Statement, String) |
|
|
|
|
|
|
|
|
|
|
|
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : String(str), Class(stmtClass), Decl(decl) {} |
|
|
|
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : String(str), _class(stmtClass), decl(decl) {} |
|
|
|
|
|
|
|
|
|
|
|
Expression::Expression(const std::string& str, StatementClass stmtClass, Declaration* decl) |
|
|
|
Expression::Expression(const std::string& str, StatementClass stmtClass, Declaration* decl) |
|
|
|
: Statement(str, stmtClass, decl) {} |
|
|
|
: Statement(str, stmtClass, decl) {} |
|
|
@ -597,26 +597,26 @@ CXXConstructExpr::~CXXConstructExpr() |
|
|
|
DEF_VECTOR(CXXConstructExpr, Expression*, Arguments) |
|
|
|
DEF_VECTOR(CXXConstructExpr, Expression*, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
Parameter::Parameter() : Declaration(DeclarationKind::Parameter), |
|
|
|
Parameter::Parameter() : Declaration(DeclarationKind::Parameter), |
|
|
|
IsIndirect(false), HasDefaultValue(false), DefaultArgument(0) {} |
|
|
|
isIndirect(false), hasDefaultValue(false), defaultArgument(0) {} |
|
|
|
|
|
|
|
|
|
|
|
Parameter::~Parameter() |
|
|
|
Parameter::~Parameter() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (DefaultArgument) |
|
|
|
if (defaultArgument) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// HACK: see https://github.com/mono/CppSharp/issues/598
|
|
|
|
// HACK: see https://github.com/mono/CppSharp/issues/598
|
|
|
|
switch (DefaultArgument->Class) |
|
|
|
switch (defaultArgument->_class) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case StatementClass::BinaryOperator: |
|
|
|
case StatementClass::BinaryOperator: |
|
|
|
delete static_cast<BinaryOperator*>(DefaultArgument); |
|
|
|
delete static_cast<BinaryOperator*>(defaultArgument); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case StatementClass::CallExprClass: |
|
|
|
case StatementClass::CallExprClass: |
|
|
|
delete static_cast<CallExpr*>(DefaultArgument); |
|
|
|
delete static_cast<CallExpr*>(defaultArgument); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case StatementClass::CXXConstructExprClass: |
|
|
|
case StatementClass::CXXConstructExprClass: |
|
|
|
delete static_cast<CXXConstructExpr*>(DefaultArgument); |
|
|
|
delete static_cast<CXXConstructExpr*>(defaultArgument); |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
delete DefaultArgument; |
|
|
|
delete defaultArgument; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -624,9 +624,9 @@ Parameter::~Parameter() |
|
|
|
|
|
|
|
|
|
|
|
Function::Function() |
|
|
|
Function::Function() |
|
|
|
: Declaration(DeclarationKind::Function) |
|
|
|
: Declaration(DeclarationKind::Function) |
|
|
|
, IsReturnIndirect(false) |
|
|
|
, isReturnIndirect(false) |
|
|
|
, SpecializationInfo(0) |
|
|
|
, specializationInfo(0) |
|
|
|
, InstantiatedFrom(0) |
|
|
|
, instantiatedFrom(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -638,17 +638,17 @@ DEF_VECTOR(Function, Parameter*, Parameters) |
|
|
|
|
|
|
|
|
|
|
|
Method::Method() |
|
|
|
Method::Method() |
|
|
|
: Function() |
|
|
|
: Function() |
|
|
|
, IsVirtual(false) |
|
|
|
, isVirtual(false) |
|
|
|
, IsStatic(false) |
|
|
|
, isStatic(false) |
|
|
|
, IsConst(false) |
|
|
|
, isConst(false) |
|
|
|
, IsExplicit(false) |
|
|
|
, isExplicit(false) |
|
|
|
, IsOverride(false) |
|
|
|
, isOverride(false) |
|
|
|
, IsDefaultConstructor(false) |
|
|
|
, isDefaultConstructor(false) |
|
|
|
, IsCopyConstructor(false) |
|
|
|
, isCopyConstructor(false) |
|
|
|
, IsMoveConstructor(false) |
|
|
|
, isMoveConstructor(false) |
|
|
|
, RefQualifier(RefQualifierKind::None) |
|
|
|
, refQualifier(RefQualifierKind::None) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Kind = DeclarationKind::Method; |
|
|
|
kind = DeclarationKind::Method; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Method::~Method() {} |
|
|
|
Method::~Method() {} |
|
|
@ -656,7 +656,7 @@ Method::~Method() {} |
|
|
|
// Enumeration
|
|
|
|
// Enumeration
|
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Enumeration() : DeclarationContext(DeclarationKind::Enumeration), |
|
|
|
Enumeration::Enumeration() : DeclarationContext(DeclarationKind::Enumeration), |
|
|
|
Modifiers((EnumModifiers)0), Type(0), BuiltinType(0) {} |
|
|
|
modifiers((EnumModifiers)0), type(0), builtinType(0) {} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::~Enumeration() {} |
|
|
|
Enumeration::~Enumeration() {} |
|
|
|
|
|
|
|
|
|
|
@ -665,7 +665,7 @@ DEF_VECTOR(Enumeration, Enumeration::Item*, Items) |
|
|
|
Enumeration::Item::Item() : Declaration(DeclarationKind::EnumerationItem) {} |
|
|
|
Enumeration::Item::Item() : Declaration(DeclarationKind::EnumerationItem) {} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Item::Item(const Item& rhs) : Declaration(rhs), |
|
|
|
Enumeration::Item::Item(const Item& rhs) : Declaration(rhs), |
|
|
|
Expression(rhs.Expression), Value(rhs.Value) {} |
|
|
|
Expression(rhs.Expression), value(rhs.value) {} |
|
|
|
|
|
|
|
|
|
|
|
Enumeration::Item::~Item() {} |
|
|
|
Enumeration::Item::~Item() {} |
|
|
|
|
|
|
|
|
|
|
@ -686,10 +686,10 @@ Variable::~Variable() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(Variable, Mangled) |
|
|
|
DEF_STRING(Variable, Mangled) |
|
|
|
|
|
|
|
|
|
|
|
BaseClassSpecifier::BaseClassSpecifier() : Type(0), Offset(0) {} |
|
|
|
BaseClassSpecifier::BaseClassSpecifier() : type(0), offset(0) {} |
|
|
|
|
|
|
|
|
|
|
|
Field::Field() : Declaration(DeclarationKind::Field), Class(0), |
|
|
|
Field::Field() : Declaration(DeclarationKind::Field), _class(0), |
|
|
|
IsBitField(false), BitWidth(0) {} |
|
|
|
isBitField(false), bitWidth(0) {} |
|
|
|
|
|
|
|
|
|
|
|
Field::~Field() {} |
|
|
|
Field::~Field() {} |
|
|
|
|
|
|
|
|
|
|
@ -700,23 +700,23 @@ AccessSpecifierDecl::~AccessSpecifierDecl() {} |
|
|
|
|
|
|
|
|
|
|
|
Class::Class() |
|
|
|
Class::Class() |
|
|
|
: DeclarationContext(DeclarationKind::Class) |
|
|
|
: DeclarationContext(DeclarationKind::Class) |
|
|
|
, IsPOD(false) |
|
|
|
, isPOD(false) |
|
|
|
, IsAbstract(false) |
|
|
|
, isAbstract(false) |
|
|
|
, IsUnion(false) |
|
|
|
, isUnion(false) |
|
|
|
, IsDynamic(false) |
|
|
|
, isDynamic(false) |
|
|
|
, IsPolymorphic(false) |
|
|
|
, isPolymorphic(false) |
|
|
|
, HasNonTrivialDefaultConstructor(false) |
|
|
|
, hasNonTrivialDefaultConstructor(false) |
|
|
|
, HasNonTrivialCopyConstructor(false) |
|
|
|
, hasNonTrivialCopyConstructor(false) |
|
|
|
, HasNonTrivialDestructor(false) |
|
|
|
, hasNonTrivialDestructor(false) |
|
|
|
, IsExternCContext(false) |
|
|
|
, isExternCContext(false) |
|
|
|
, Layout(0) |
|
|
|
, layout(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Class::~Class() |
|
|
|
Class::~Class() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (Layout) |
|
|
|
if (layout) |
|
|
|
delete Layout; |
|
|
|
delete layout; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(Class, BaseClassSpecifier*, Bases) |
|
|
|
DEF_VECTOR(Class, BaseClassSpecifier*, Bases) |
|
|
@ -743,9 +743,9 @@ DEF_VECTOR(ClassTemplate, ClassTemplateSpecialization*, Specializations) |
|
|
|
|
|
|
|
|
|
|
|
ClassTemplateSpecialization::ClassTemplateSpecialization() |
|
|
|
ClassTemplateSpecialization::ClassTemplateSpecialization() |
|
|
|
: Class() |
|
|
|
: Class() |
|
|
|
, TemplatedDecl(0) |
|
|
|
, templatedDecl(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Kind = DeclarationKind::ClassTemplateSpecialization; |
|
|
|
kind = DeclarationKind::ClassTemplateSpecialization; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ClassTemplateSpecialization::~ClassTemplateSpecialization() {} |
|
|
|
ClassTemplateSpecialization::~ClassTemplateSpecialization() {} |
|
|
@ -755,7 +755,7 @@ DEF_VECTOR(ClassTemplateSpecialization, TemplateArgument, Arguments) |
|
|
|
ClassTemplatePartialSpecialization::ClassTemplatePartialSpecialization() |
|
|
|
ClassTemplatePartialSpecialization::ClassTemplatePartialSpecialization() |
|
|
|
: ClassTemplateSpecialization() |
|
|
|
: ClassTemplateSpecialization() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Kind = DeclarationKind::ClassTemplatePartialSpecialization; |
|
|
|
kind = DeclarationKind::ClassTemplatePartialSpecialization; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ClassTemplatePartialSpecialization::~ClassTemplatePartialSpecialization() {} |
|
|
|
ClassTemplatePartialSpecialization::~ClassTemplatePartialSpecialization() {} |
|
|
@ -769,7 +769,7 @@ DEF_VECTOR(FunctionTemplate, FunctionTemplateSpecialization*, Specializations) |
|
|
|
FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std::string& usr) |
|
|
|
FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std::string& usr) |
|
|
|
{ |
|
|
|
{ |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
auto foundSpec = std::find_if(Specializations.begin(), Specializations.end(), |
|
|
|
[&](FunctionTemplateSpecialization* cts) { return cts->SpecializedFunction->USR == usr; }); |
|
|
|
[&](FunctionTemplateSpecialization* cts) { return cts->specializedFunction->USR == usr; }); |
|
|
|
|
|
|
|
|
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
if (foundSpec != Specializations.end()) |
|
|
|
return static_cast<FunctionTemplateSpecialization*>(*foundSpec); |
|
|
|
return static_cast<FunctionTemplateSpecialization*>(*foundSpec); |
|
|
@ -778,8 +778,8 @@ FunctionTemplateSpecialization* FunctionTemplate::FindSpecialization(const std:: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FunctionTemplateSpecialization::FunctionTemplateSpecialization() |
|
|
|
FunctionTemplateSpecialization::FunctionTemplateSpecialization() |
|
|
|
: Template(0) |
|
|
|
: _template(0) |
|
|
|
, SpecializedFunction(0) |
|
|
|
, specializedFunction(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -816,9 +816,9 @@ VarTemplatePartialSpecialization* VarTemplate::FindPartialSpecialization(const s |
|
|
|
|
|
|
|
|
|
|
|
VarTemplateSpecialization::VarTemplateSpecialization() |
|
|
|
VarTemplateSpecialization::VarTemplateSpecialization() |
|
|
|
: Variable() |
|
|
|
: Variable() |
|
|
|
, TemplatedDecl(0) |
|
|
|
, templatedDecl(0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Kind = DeclarationKind::VarTemplateSpecialization; |
|
|
|
kind = DeclarationKind::VarTemplateSpecialization; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VarTemplateSpecialization::~VarTemplateSpecialization() {} |
|
|
|
VarTemplateSpecialization::~VarTemplateSpecialization() {} |
|
|
@ -828,7 +828,7 @@ DEF_VECTOR(VarTemplateSpecialization, TemplateArgument, Arguments) |
|
|
|
VarTemplatePartialSpecialization::VarTemplatePartialSpecialization() |
|
|
|
VarTemplatePartialSpecialization::VarTemplatePartialSpecialization() |
|
|
|
: VarTemplateSpecialization() |
|
|
|
: VarTemplateSpecialization() |
|
|
|
{ |
|
|
|
{ |
|
|
|
Kind = DeclarationKind::VarTemplatePartialSpecialization; |
|
|
|
kind = DeclarationKind::VarTemplatePartialSpecialization; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization() |
|
|
|
VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization() |
|
|
@ -837,32 +837,32 @@ VarTemplatePartialSpecialization::~VarTemplatePartialSpecialization() |
|
|
|
|
|
|
|
|
|
|
|
Namespace::Namespace() |
|
|
|
Namespace::Namespace() |
|
|
|
: DeclarationContext(DeclarationKind::Namespace) |
|
|
|
: DeclarationContext(DeclarationKind::Namespace) |
|
|
|
, IsInline(false) |
|
|
|
, isInline(false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Namespace::~Namespace() {} |
|
|
|
Namespace::~Namespace() {} |
|
|
|
|
|
|
|
|
|
|
|
PreprocessedEntity::PreprocessedEntity() |
|
|
|
PreprocessedEntity::PreprocessedEntity() |
|
|
|
: MacroLocation(AST::MacroLocation::Unknown), |
|
|
|
: macroLocation(AST::MacroLocation::Unknown), |
|
|
|
OriginalPtr(0), Kind(DeclarationKind::PreprocessedEntity) {} |
|
|
|
originalPtr(0), kind(DeclarationKind::PreprocessedEntity) {} |
|
|
|
|
|
|
|
|
|
|
|
MacroDefinition::MacroDefinition() |
|
|
|
MacroDefinition::MacroDefinition() |
|
|
|
: LineNumberStart(0), LineNumberEnd(0) { Kind = DeclarationKind::MacroDefinition; } |
|
|
|
: lineNumberStart(0), lineNumberEnd(0) { kind = DeclarationKind::MacroDefinition; } |
|
|
|
|
|
|
|
|
|
|
|
MacroDefinition::~MacroDefinition() {} |
|
|
|
MacroDefinition::~MacroDefinition() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(MacroDefinition, Name) |
|
|
|
DEF_STRING(MacroDefinition, Name) |
|
|
|
DEF_STRING(MacroDefinition, Expression) |
|
|
|
DEF_STRING(MacroDefinition, Expression) |
|
|
|
|
|
|
|
|
|
|
|
MacroExpansion::MacroExpansion() : Definition(0) { Kind = DeclarationKind::MacroExpansion; } |
|
|
|
MacroExpansion::MacroExpansion() : definition(0) { kind = DeclarationKind::MacroExpansion; } |
|
|
|
|
|
|
|
|
|
|
|
MacroExpansion::~MacroExpansion() {} |
|
|
|
MacroExpansion::~MacroExpansion() {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(MacroExpansion, Name) |
|
|
|
DEF_STRING(MacroExpansion, Name) |
|
|
|
DEF_STRING(MacroExpansion, Text) |
|
|
|
DEF_STRING(MacroExpansion, Text) |
|
|
|
|
|
|
|
|
|
|
|
TranslationUnit::TranslationUnit() { Kind = DeclarationKind::TranslationUnit; } |
|
|
|
TranslationUnit::TranslationUnit() { kind = DeclarationKind::TranslationUnit; } |
|
|
|
|
|
|
|
|
|
|
|
TranslationUnit::~TranslationUnit() {} |
|
|
|
TranslationUnit::~TranslationUnit() {} |
|
|
|
|
|
|
|
|
|
|
@ -870,7 +870,7 @@ DEF_STRING(TranslationUnit, FileName) |
|
|
|
DEF_VECTOR(TranslationUnit, MacroDefinition*, Macros) |
|
|
|
DEF_VECTOR(TranslationUnit, MacroDefinition*, Macros) |
|
|
|
|
|
|
|
|
|
|
|
NativeLibrary::NativeLibrary() |
|
|
|
NativeLibrary::NativeLibrary() |
|
|
|
: ArchType(AST::ArchType::UnknownArch) |
|
|
|
: archType(AST::ArchType::UnknownArch) |
|
|
|
{ |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -929,17 +929,17 @@ TranslationUnit* ASTContext::FindOrCreateModule(std::string File) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Comments
|
|
|
|
// Comments
|
|
|
|
Comment::Comment(CommentKind kind) : Kind(kind) {} |
|
|
|
Comment::Comment(CommentKind kind) : kind(kind) {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(RawComment, Text) |
|
|
|
DEF_STRING(RawComment, Text) |
|
|
|
DEF_STRING(RawComment, BriefText) |
|
|
|
DEF_STRING(RawComment, BriefText) |
|
|
|
|
|
|
|
|
|
|
|
RawComment::RawComment() : FullCommentBlock(0) {} |
|
|
|
RawComment::RawComment() : fullCommentBlock(0) {} |
|
|
|
|
|
|
|
|
|
|
|
RawComment::~RawComment() |
|
|
|
RawComment::~RawComment() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (FullCommentBlock) |
|
|
|
if (fullCommentBlock) |
|
|
|
delete FullCommentBlock; |
|
|
|
delete fullCommentBlock; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FullComment::FullComment() : Comment(CommentKind::FullComment) {} |
|
|
|
FullComment::FullComment() : Comment(CommentKind::FullComment) {} |
|
|
@ -949,7 +949,7 @@ FullComment::~FullComment() |
|
|
|
for (auto& block : Blocks) |
|
|
|
for (auto& block : Blocks) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// HACK: see https://github.com/mono/CppSharp/issues/599
|
|
|
|
// HACK: see https://github.com/mono/CppSharp/issues/599
|
|
|
|
switch (block->Kind) |
|
|
|
switch (block->kind) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case CommentKind::BlockCommandComment: |
|
|
|
case CommentKind::BlockCommandComment: |
|
|
|
delete static_cast<BlockCommandComment*>(block); |
|
|
|
delete static_cast<BlockCommandComment*>(block); |
|
|
@ -988,18 +988,18 @@ BlockCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(BlockCommandComment::Argument, Text) |
|
|
|
DEF_STRING(BlockCommandComment::Argument, Text) |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), CommandId(0), ParagraphComment(0) {} |
|
|
|
BlockCommandComment::BlockCommandComment() : BlockContentComment(CommentKind::BlockCommandComment), commandId(0), paragraphComment(0) {} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::BlockCommandComment(CommentKind Kind) : BlockContentComment(Kind), CommandId(0), ParagraphComment(0) {} |
|
|
|
BlockCommandComment::BlockCommandComment(CommentKind Kind) : BlockContentComment(Kind), commandId(0), paragraphComment(0) {} |
|
|
|
|
|
|
|
|
|
|
|
BlockCommandComment::~BlockCommandComment() |
|
|
|
BlockCommandComment::~BlockCommandComment() |
|
|
|
{ |
|
|
|
{ |
|
|
|
delete ParagraphComment; |
|
|
|
delete paragraphComment; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(BlockCommandComment, BlockCommandComment::Argument, Arguments) |
|
|
|
DEF_VECTOR(BlockCommandComment, BlockCommandComment::Argument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|
ParamCommandComment::ParamCommandComment() : BlockCommandComment(CommentKind::ParamCommandComment), Direction(PassDirection::In), ParamIndex(0) {} |
|
|
|
ParamCommandComment::ParamCommandComment() : BlockCommandComment(CommentKind::ParamCommandComment), direction(PassDirection::In), paramIndex(0) {} |
|
|
|
|
|
|
|
|
|
|
|
TParamCommandComment::TParamCommandComment() : BlockCommandComment(CommentKind::TParamCommandComment) {} |
|
|
|
TParamCommandComment::TParamCommandComment() : BlockCommandComment(CommentKind::TParamCommandComment) {} |
|
|
|
|
|
|
|
|
|
|
@ -1019,14 +1019,14 @@ VerbatimLineComment::VerbatimLineComment() : BlockCommandComment(CommentKind::Ve |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(VerbatimLineComment, Text) |
|
|
|
DEF_STRING(VerbatimLineComment, Text) |
|
|
|
|
|
|
|
|
|
|
|
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), IsWhitespace(false) {} |
|
|
|
ParagraphComment::ParagraphComment() : BlockContentComment(CommentKind::ParagraphComment), isWhitespace(false) {} |
|
|
|
|
|
|
|
|
|
|
|
ParagraphComment::~ParagraphComment() |
|
|
|
ParagraphComment::~ParagraphComment() |
|
|
|
{ |
|
|
|
{ |
|
|
|
for (auto& content : Content) |
|
|
|
for (auto& content : Content) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// HACK: see https://github.com/mono/CppSharp/issues/599
|
|
|
|
// HACK: see https://github.com/mono/CppSharp/issues/599
|
|
|
|
switch (content->Kind) |
|
|
|
switch (content->kind) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case CommentKind::InlineCommandComment: |
|
|
|
case CommentKind::InlineCommandComment: |
|
|
|
delete static_cast<InlineCommandComment*>(content); |
|
|
|
delete static_cast<InlineCommandComment*>(content); |
|
|
@ -1074,9 +1074,9 @@ HTMLEndTagComment::HTMLEndTagComment() : HTMLTagComment(CommentKind::HTMLEndTagC |
|
|
|
|
|
|
|
|
|
|
|
DEF_STRING(HTMLEndTagComment, TagName) |
|
|
|
DEF_STRING(HTMLEndTagComment, TagName) |
|
|
|
|
|
|
|
|
|
|
|
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment), HasTrailingNewline(false) {} |
|
|
|
InlineContentComment::InlineContentComment() : Comment(CommentKind::InlineContentComment), hasTrailingNewline(false) {} |
|
|
|
|
|
|
|
|
|
|
|
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind), HasTrailingNewline(false) {} |
|
|
|
InlineContentComment::InlineContentComment(CommentKind Kind) : Comment(Kind), hasTrailingNewline(false) {} |
|
|
|
|
|
|
|
|
|
|
|
TextComment::TextComment() : InlineContentComment(CommentKind::TextComment) {} |
|
|
|
TextComment::TextComment() : InlineContentComment(CommentKind::TextComment) {} |
|
|
|
|
|
|
|
|
|
|
@ -1089,7 +1089,7 @@ InlineCommandComment::Argument::Argument(const Argument& rhs) : Text(rhs.Text) { |
|
|
|
DEF_STRING(InlineCommandComment::Argument, Text) |
|
|
|
DEF_STRING(InlineCommandComment::Argument, Text) |
|
|
|
|
|
|
|
|
|
|
|
InlineCommandComment::InlineCommandComment() |
|
|
|
InlineCommandComment::InlineCommandComment() |
|
|
|
: InlineContentComment(CommentKind::InlineCommandComment), CommandId(0), CommentRenderKind(RenderNormal) {} |
|
|
|
: InlineContentComment(CommentKind::InlineCommandComment), commandId(0), commentRenderKind(RenderNormal) {} |
|
|
|
|
|
|
|
|
|
|
|
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments) |
|
|
|
DEF_VECTOR(InlineCommandComment, InlineCommandComment::Argument, Arguments) |
|
|
|
|
|
|
|
|
|
|
|