Add cpp_constructor and cpp_destructor
This commit is contained in:
parent
03da9ceb63
commit
7c896453b5
5 changed files with 106 additions and 0 deletions
|
|
@ -55,6 +55,10 @@ const char* cppast::to_string(cpp_entity_kind kind) noexcept
|
|||
return "member function";
|
||||
case cpp_entity_kind::conversion_op_t:
|
||||
return "conversion operator";
|
||||
case cpp_entity_kind::constructor_t:
|
||||
return "constructor";
|
||||
case cpp_entity_kind::destructor_t:
|
||||
return "destructor";
|
||||
|
||||
case cpp_entity_kind::count:
|
||||
break;
|
||||
|
|
@ -88,6 +92,8 @@ bool cppast::is_type(cpp_entity_kind kind) noexcept
|
|||
case cpp_entity_kind::function_t:
|
||||
case cpp_entity_kind::member_function_t:
|
||||
case cpp_entity_kind::conversion_op_t:
|
||||
case cpp_entity_kind::constructor_t:
|
||||
case cpp_entity_kind::destructor_t:
|
||||
case cpp_entity_kind::count:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,3 +17,13 @@ cpp_entity_kind cpp_conversion_op::do_get_entity_kind() const noexcept
|
|||
{
|
||||
return cpp_entity_kind::conversion_op_t;
|
||||
}
|
||||
|
||||
cpp_entity_kind cpp_constructor::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::constructor_t;
|
||||
}
|
||||
|
||||
cpp_entity_kind cpp_destructor::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::destructor_t;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ bool detail::visit(const cpp_entity& e, detail::visitor_callback_t cb, void* fun
|
|||
return handle_container<cpp_member_function>(e, cb, functor);
|
||||
case cpp_entity_kind::conversion_op_t:
|
||||
return handle_container<cpp_conversion_op>(e, cb, functor);
|
||||
case cpp_entity_kind::constructor_t:
|
||||
return handle_container<cpp_constructor>(e, cb, functor);
|
||||
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
case cpp_entity_kind::using_directive_t:
|
||||
|
|
@ -67,6 +69,7 @@ bool detail::visit(const cpp_entity& e, detail::visitor_callback_t cb, void* fun
|
|||
case cpp_entity_kind::member_variable_t:
|
||||
case cpp_entity_kind::bitfield_t:
|
||||
case cpp_entity_kind::function_parameter_t:
|
||||
case cpp_entity_kind::destructor_t:
|
||||
return cb(functor, e, visitor_info::leaf_entity);
|
||||
|
||||
case cpp_entity_kind::count:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue