Browse Source

Modify parser to set the Namespace in MacroDefinition

pull/162/head
Øystein Krog 12 years ago
parent
commit
e9f43c059e
  1. 1
      src/CppParser/Parser.cpp
  2. 1
      src/Parser/Parser.cpp

1
src/CppParser/Parser.cpp

@ -2047,6 +2047,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity( @@ -2047,6 +2047,7 @@ PreprocessedEntity* Parser::WalkPreprocessedEntity(
auto Definition = new MacroDefinition();
Entity = Definition;
Definition->Namespace = GetTranslationUnit(MD->getLocation(), NULL);
Definition->Name = II->getName().trim();
Definition->Expression = Expression.trim();
}

1
src/Parser/Parser.cpp

@ -2071,6 +2071,7 @@ CppSharp::AST::PreprocessedEntity^ Parser::WalkPreprocessedEntity( @@ -2071,6 +2071,7 @@ CppSharp::AST::PreprocessedEntity^ Parser::WalkPreprocessedEntity(
auto Definition = gcnew CppSharp::AST::MacroDefinition();
Entity = Definition;
Definition->Namespace = GetTranslationUnit(MD->getLocation(), NULL);
Definition->Name = clix::marshalString<clix::E_UTF8>(II->getName())->Trim();
Definition->Expression = clix::marshalString<clix::E_UTF8>(Expression)->Trim();
}

Loading…
Cancel
Save