Browse Source

Fixed preprocessed entities parsing in the new parser.

pull/220/merge
triton 12 years ago
parent
commit
35488071ed
  1. 11
      src/CppParser/Parser.cpp

11
src/CppParser/Parser.cpp

@ -2102,6 +2102,17 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
return nullptr; return nullptr;
Entity->OriginalPtr = PPEntity; Entity->OriginalPtr = PPEntity;
Entity->_Namespace = GetTranslationUnit(PPEntity->getSourceRange().getBegin());
if (Decl->Kind == CppSharp::CppParser::AST::DeclarationKind::TranslationUnit)
{
Entity->_Namespace->PreprocessedEntities.push_back(Entity);
}
else
{
Decl->PreprocessedEntities.push_back(Entity);
}
Decl->PreprocessedEntities.push_back(Entity); Decl->PreprocessedEntities.push_back(Entity);
return Entity; return Entity;

Loading…
Cancel
Save