Add cpp_namespace_alias

This commit is contained in:
Jonathan Müller 2017-01-21 13:15:13 +01:00
commit 75c67ab5cd
4 changed files with 83 additions and 0 deletions

View file

@ -14,6 +14,7 @@ bool cppast::is_scope(cpp_entity_type type) noexcept
return true;
case cpp_entity_type::file_t:
case cpp_entity_type::namespace_alias_t:
break;
}

View file

@ -12,3 +12,14 @@ cpp_entity_type cpp_namespace::do_get_entity_type() const noexcept
{
return cpp_entity_type::namespace_t;
}
const cpp_namespace& cpp_namespace_ref::get(const cpp_entity_index& idx) const noexcept
{
return detail::downcast_entity<const cpp_namespace&>(idx.lookup(target_).value(),
cpp_entity_type::namespace_t);
}
cpp_entity_type cpp_namespace_alias::do_get_entity_type() const noexcept
{
return cpp_entity_type::namespace_alias_t;
}