Add cpp_scope_name to support templated scopes
This commit is contained in:
parent
6894a025ca
commit
06cf090b35
7 changed files with 75 additions and 15 deletions
|
|
@ -140,6 +140,7 @@ unsigned count_children(const Entity& cont)
|
|||
return std::distance(cont.begin(), cont.end());
|
||||
}
|
||||
|
||||
// ignores templated scopes
|
||||
inline std::string full_name(const cppast::cpp_entity& e)
|
||||
{
|
||||
if (e.name().empty())
|
||||
|
|
@ -152,8 +153,9 @@ inline std::string full_name(const cppast::cpp_entity& e)
|
|||
|
||||
for (auto cur = e.parent(); cur; cur = cur.value().parent())
|
||||
// prepend each scope, if there is any
|
||||
type_safe::with(cur.value().scope_name(),
|
||||
[&](const std::string& cur_scope) { scopes = cur_scope + "::" + scopes; });
|
||||
type_safe::with(cur.value().scope_name(), [&](const cppast::cpp_scope_name& cur_scope) {
|
||||
scopes = cur_scope.name() + "::" + scopes;
|
||||
});
|
||||
|
||||
return scopes + e.name();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue