Browse Source

Cleaned up AST.h.

* Added some regions make the code easier to work with.
* Moved related things together.
pull/222/head
triton 11 years ago
parent
commit
2248b565d3
  1. 115
      src/CppParser/AST.h

115
src/CppParser/AST.h

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
namespace CppSharp { namespace CppParser { namespace AST {
// Types
#pragma region Types
enum struct TypeKind
{
@ -244,33 +244,17 @@ struct CS_API BuiltinType : public Type @@ -244,33 +244,17 @@ struct CS_API BuiltinType : public Type
PrimitiveType Type;
};
// Comments
#pragma endregion
enum struct RawCommentKind
{
Invalid,
OrdinaryBCPL,
OrdinaryC,
BCPLSlash,
BCPLExcl,
JavaDoc,
Qt,
Merged
};
struct FullComment;
#pragma region ABI
struct CS_API RawComment
enum struct CppAbi
{
RawComment();
RawCommentKind Kind;
STRING(Text)
STRING(BriefText)
CppSharp::CppParser::AST::FullComment* FullComment;
Itanium,
Microsoft,
ARM
};
// Class layouts
enum struct VTableComponentKind
{
VCallOffset,
@ -305,13 +289,6 @@ struct CS_API VFTableInfo @@ -305,13 +289,6 @@ struct CS_API VFTableInfo
VTableLayout Layout;
};
enum struct CppAbi
{
Itanium,
Microsoft,
ARM
};
struct CS_API ClassLayout
{
ClassLayout();
@ -325,27 +302,9 @@ struct CS_API ClassLayout @@ -325,27 +302,9 @@ struct CS_API ClassLayout
int DataSize;
};
// Declarations
#pragma endregion
enum struct MacroLocation
{
Unknown,
ClassHead,
ClassBody,
FunctionHead,
FunctionParameters,
FunctionBody,
};
enum struct AccessSpecifier
{
Private,
Protected,
Public
};
struct DeclarationContext;
struct PreprocessedEntity;
#pragma region Declarations
enum struct DeclarationKind
{
@ -375,6 +334,17 @@ enum struct DeclarationKind @@ -375,6 +334,17 @@ enum struct DeclarationKind
#define DECLARE_DECL_KIND(klass, kind) \
klass();
enum struct AccessSpecifier
{
Private,
Protected,
Public
};
struct DeclarationContext;
struct RawComment;
struct PreprocessedEntity;
struct CS_API Declaration
{
Declaration(DeclarationKind kind);
@ -583,6 +553,9 @@ struct CS_API Variable : public Declaration @@ -583,6 +553,9 @@ struct CS_API Variable : public Declaration
CppSharp::CppParser::AST::QualifiedType QualifiedType;
};
struct DeclarationContext;
struct PreprocessedEntity;
struct CS_API BaseClassSpecifier
{
BaseClassSpecifier();
@ -680,6 +653,16 @@ struct CS_API Namespace : public DeclarationContext @@ -680,6 +653,16 @@ struct CS_API Namespace : public DeclarationContext
Namespace();
};
enum struct MacroLocation
{
Unknown,
ClassHead,
ClassBody,
FunctionHead,
FunctionParameters,
FunctionBody,
};
struct CS_API PreprocessedEntity : public Declaration
{
PreprocessedEntity();
@ -719,4 +702,36 @@ struct CS_API ASTContext @@ -719,4 +702,36 @@ struct CS_API ASTContext
VECTOR(TranslationUnit*, TranslationUnits)
};
#pragma endregion
#pragma region Comments
#define DECLARE_COMMENT_KIND(kind) \
kind##Type();
enum struct RawCommentKind
{
Invalid,
OrdinaryBCPL,
OrdinaryC,
BCPLSlash,
BCPLExcl,
JavaDoc,
Qt,
Merged
};
struct FullComment;
struct CS_API RawComment
{
RawComment();
RawCommentKind Kind;
STRING(Text)
STRING(BriefText)
CppSharp::CppParser::AST::FullComment* FullComment;
};
#pragma endregion
} } }
Loading…
Cancel
Save