Browse Source

Added names to all parameters in the header for the parser.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/124/head
Dimitar Dobrev 12 years ago
parent
commit
3f6b1d33f8
  1. 44
      src/CppParser/Parser.h
  2. 50
      src/Parser/Parser.h

44
src/CppParser/Parser.h

@ -63,48 +63,48 @@ protected:
Declaration* WalkDeclaration(clang::Decl* D, Declaration* WalkDeclaration(clang::Decl* D,
bool IgnoreSystemDecls = true, bool CanBeDefinition = false); bool IgnoreSystemDecls = true, bool CanBeDefinition = false);
Declaration* WalkDeclarationDef(clang::Decl* D); Declaration* WalkDeclarationDef(clang::Decl* D);
Enumeration* WalkEnum(clang::EnumDecl*); Enumeration* WalkEnum(clang::EnumDecl* ED);
Function* WalkFunction(clang::FunctionDecl*, bool IsDependent = false, Function* WalkFunction(clang::FunctionDecl* FD, bool IsDependent = false,
bool AddToNamespace = true); bool AddToNamespace = true);
Class* WalkRecordCXX(clang::CXXRecordDecl*); Class* WalkRecordCXX(clang::CXXRecordDecl* Record);
Method* WalkMethodCXX(clang::CXXMethodDecl*); Method* WalkMethodCXX(clang::CXXMethodDecl* MD);
Field* WalkFieldCXX(clang::FieldDecl*, Class*); Field* WalkFieldCXX(clang::FieldDecl* FD, Class* Class);
ClassTemplate* WalkClassTemplate(clang::ClassTemplateDecl*); ClassTemplate* WalkClassTemplate(clang::ClassTemplateDecl* TD);
FunctionTemplate* WalkFunctionTemplate( FunctionTemplate* WalkFunctionTemplate(
clang::FunctionTemplateDecl*); clang::FunctionTemplateDecl* TD);
Variable* WalkVariable(clang::VarDecl*); Variable* WalkVariable(clang::VarDecl* VD);
RawComment* WalkRawComment(const clang::RawComment*); RawComment* WalkRawComment(const clang::RawComment* RC);
Type* WalkType(clang::QualType, clang::TypeLoc* = 0, Type* WalkType(clang::QualType QualType, clang::TypeLoc* TL = 0,
bool DesugarType = false); bool DesugarType = false);
void WalkVTable(clang::CXXRecordDecl*, Class*); void WalkVTable(clang::CXXRecordDecl* RD, Class* C);
VTableLayout WalkVTableLayout(const clang::VTableLayout&); VTableLayout WalkVTableLayout(const clang::VTableLayout& VTLayout);
VTableComponent WalkVTableComponent(const clang::VTableComponent&); VTableComponent WalkVTableComponent(const clang::VTableComponent& Component);
// Clang helpers // Clang helpers
SourceLocationKind GetLocationKind(const clang::SourceLocation& Loc); SourceLocationKind GetLocationKind(const clang::SourceLocation& Loc);
bool IsValidDeclaration(const clang::SourceLocation& Loc); bool IsValidDeclaration(const clang::SourceLocation& Loc);
std::string GetDeclMangledName(clang::Decl*, clang::TargetCXXABI, std::string GetDeclMangledName(clang::Decl* D, clang::TargetCXXABI ABI,
bool IsDependent = false); bool IsDependent = false);
std::string GetTypeName(const clang::Type*); std::string GetTypeName(const clang::Type* Type);
void WalkFunction(clang::FunctionDecl* FD, Function* F, void WalkFunction(clang::FunctionDecl* FD, Function* F,
bool IsDependent = false); bool IsDependent = false);
void HandlePreprocessedEntities(Declaration* Decl, clang::SourceRange sourceRange, void HandlePreprocessedEntities(Declaration* Decl, clang::SourceRange sourceRange,
MacroLocation macroLocation = MacroLocation::Unknown); MacroLocation macroLocation = MacroLocation::Unknown);
bool GetDeclText(clang::SourceRange, std::string& Text); bool GetDeclText(clang::SourceRange SR, std::string& Text);
TranslationUnit* GetTranslationUnit(clang::SourceLocation Loc, TranslationUnit* GetTranslationUnit(clang::SourceLocation Loc,
SourceLocationKind *Kind = 0); SourceLocationKind *Kind = 0);
TranslationUnit* GetTranslationUnit(const clang::Decl*); TranslationUnit* GetTranslationUnit(const clang::Decl* D);
DeclarationContext* GetNamespace(clang::Decl*, clang::DeclContext*); DeclarationContext* GetNamespace(clang::Decl* D, clang::DeclContext* Ctx);
DeclarationContext* GetNamespace(clang::Decl*); DeclarationContext* GetNamespace(clang::Decl* D);
clang::CallingConv GetAbiCallConv(clang::CallingConv CC, clang::CallingConv GetAbiCallConv(clang::CallingConv CC,
bool IsInstMethod, bool IsVariadic); bool IsInstMethod, bool IsVariadic);
void HandleDeclaration(clang::Decl* D, Declaration*); void HandleDeclaration(clang::Decl* D, Declaration* Decl);
void HandleOriginalText(clang::Decl* D, Declaration*); void HandleOriginalText(clang::Decl* D, Declaration* Decl);
void HandleComments(clang::Decl* D, Declaration*); void HandleComments(clang::Decl* D, Declaration* Decl);
void HandleDiagnostics(ParserResult* res); void HandleDiagnostics(ParserResult* res);
int Index; int Index;

50
src/Parser/Parser.h

@ -63,51 +63,51 @@ protected:
CppSharp::AST::Declaration^ WalkDeclaration(clang::Decl* D, CppSharp::AST::Declaration^ WalkDeclaration(clang::Decl* D,
bool IgnoreSystemDecls = true, bool CanBeDefinition = false); bool IgnoreSystemDecls = true, bool CanBeDefinition = false);
CppSharp::AST::Declaration^ WalkDeclarationDef(clang::Decl* D); CppSharp::AST::Declaration^ WalkDeclarationDef(clang::Decl* D);
CppSharp::AST::Enumeration^ WalkEnum(clang::EnumDecl*); CppSharp::AST::Enumeration^ WalkEnum(clang::EnumDecl* ED);
CppSharp::AST::Function^ WalkFunction(clang::FunctionDecl*, bool IsDependent = false, CppSharp::AST::Function^ WalkFunction(clang::FunctionDecl* FD, bool IsDependent = false,
bool AddToNamespace = true); bool AddToNamespace = true);
CppSharp::AST::Class^ WalkRecordCXX(clang::CXXRecordDecl*); CppSharp::AST::Class^ WalkRecordCXX(clang::CXXRecordDecl* Record);
void WalkRecordCXX(clang::CXXRecordDecl*, CppSharp::AST::Class^); void WalkRecordCXX(clang::CXXRecordDecl* Record, CppSharp::AST::Class^ RC);
CppSharp::AST::ClassTemplateSpecialization^ CppSharp::AST::ClassTemplateSpecialization^
WalkClassTemplateSpecialization(clang::ClassTemplateSpecializationDecl*); WalkClassTemplateSpecialization(clang::ClassTemplateSpecializationDecl* CTS);
CppSharp::AST::ClassTemplatePartialSpecialization^ CppSharp::AST::ClassTemplatePartialSpecialization^
WalkClassTemplatePartialSpecialization(clang::ClassTemplatePartialSpecializationDecl*); WalkClassTemplatePartialSpecialization(clang::ClassTemplatePartialSpecializationDecl* CTS);
CppSharp::AST::Method^ WalkMethodCXX(clang::CXXMethodDecl*); CppSharp::AST::Method^ WalkMethodCXX(clang::CXXMethodDecl* MD);
CppSharp::AST::Field^ WalkFieldCXX(clang::FieldDecl*, CppSharp::AST::Class^); CppSharp::AST::Field^ WalkFieldCXX(clang::FieldDecl* FD, CppSharp::AST::Class^ Class);
CppSharp::AST::ClassTemplate^ Parser::WalkClassTemplate(clang::ClassTemplateDecl*); CppSharp::AST::ClassTemplate^ Parser::WalkClassTemplate(clang::ClassTemplateDecl* TD);
CppSharp::AST::FunctionTemplate^ Parser::WalkFunctionTemplate( CppSharp::AST::FunctionTemplate^ Parser::WalkFunctionTemplate(
clang::FunctionTemplateDecl*); clang::FunctionTemplateDecl* TD);
CppSharp::AST::Variable^ WalkVariable(clang::VarDecl*); CppSharp::AST::Variable^ WalkVariable(clang::VarDecl* VD);
CppSharp::AST::RawComment^ WalkRawComment(const clang::RawComment*); CppSharp::AST::RawComment^ WalkRawComment(const clang::RawComment* RC);
CppSharp::AST::Type^ WalkType(clang::QualType, clang::TypeLoc* = 0, CppSharp::AST::Type^ WalkType(clang::QualType QualType, clang::TypeLoc* TL = 0,
bool DesugarType = false); bool DesugarType = false);
CppSharp::AST::QualifiedType^ WalkQualifiedType(clang::TypeSourceInfo* TSI); CppSharp::AST::QualifiedType^ WalkQualifiedType(clang::TypeSourceInfo* TSI);
void WalkVTable(clang::CXXRecordDecl*, CppSharp::AST::Class^); void WalkVTable(clang::CXXRecordDecl* RD, CppSharp::AST::Class^ C);
CppSharp::AST::VTableLayout^ WalkVTableLayout(const clang::VTableLayout&); CppSharp::AST::VTableLayout^ WalkVTableLayout(const clang::VTableLayout& VTLayout);
CppSharp::AST::VTableComponent WalkVTableComponent(const clang::VTableComponent&); CppSharp::AST::VTableComponent WalkVTableComponent(const clang::VTableComponent& Component);
// Clang helpers // Clang helpers
SourceLocationKind GetLocationKind(const clang::SourceLocation& Loc); SourceLocationKind GetLocationKind(const clang::SourceLocation& Loc);
bool IsValidDeclaration(const clang::SourceLocation& Loc); bool IsValidDeclaration(const clang::SourceLocation& Loc);
std::string GetDeclMangledName(clang::Decl*, clang::TargetCXXABI, std::string GetDeclMangledName(clang::Decl* D, clang::TargetCXXABI ABI,
bool IsDependent = false); bool IsDependent = false);
std::string GetTypeName(const clang::Type*); std::string GetTypeName(const clang::Type* Type);
void WalkFunction(clang::FunctionDecl* FD, CppSharp::AST::Function^ F, void WalkFunction(clang::FunctionDecl* FD, CppSharp::AST::Function^ F,
bool IsDependent = false); bool IsDependent = false);
void HandlePreprocessedEntities(CppSharp::AST::Declaration^ Decl, clang::SourceRange sourceRange, void HandlePreprocessedEntities(CppSharp::AST::Declaration^ Decl, clang::SourceRange sourceRange,
CppSharp::AST::MacroLocation macroLocation = CppSharp::AST::MacroLocation::Unknown); CppSharp::AST::MacroLocation macroLocation = CppSharp::AST::MacroLocation::Unknown);
bool GetDeclText(clang::SourceRange, std::string& Text); bool GetDeclText(clang::SourceRange SR, std::string& Text);
CppSharp::AST::TranslationUnit^ GetTranslationUnit(clang::SourceLocation Loc, CppSharp::AST::TranslationUnit^ GetTranslationUnit(clang::SourceLocation Loc,
SourceLocationKind *Kind = 0); SourceLocationKind *Kind = 0);
CppSharp::AST::TranslationUnit^ GetTranslationUnit(const clang::Decl*); CppSharp::AST::TranslationUnit^ GetTranslationUnit(const clang::Decl* D);
CppSharp::AST::DeclarationContext^ GetNamespace(clang::Decl*, clang::DeclContext*); CppSharp::AST::DeclarationContext^ GetNamespace(clang::Decl* D, clang::DeclContext* Ctx);
CppSharp::AST::DeclarationContext^ GetNamespace(clang::Decl*); CppSharp::AST::DeclarationContext^ GetNamespace(clang::Decl* D);
void HandleDeclaration(clang::Decl* D, CppSharp::AST::Declaration^); void HandleDeclaration(clang::Decl* D, CppSharp::AST::Declaration^ Decl);
void HandleOriginalText(clang::Decl* D, CppSharp::AST::Declaration^); void HandleOriginalText(clang::Decl* D, CppSharp::AST::Declaration^ Decl);
void HandleComments(clang::Decl* D, CppSharp::AST::Declaration^); void HandleComments(clang::Decl* D, CppSharp::AST::Declaration^ Decl);
void HandleDiagnostics(ParserResult^ res); void HandleDiagnostics(ParserResult^ res);
int Index; int Index;

Loading…
Cancel
Save