Add cpp_include_directive
This commit is contained in:
parent
54b6c86e5b
commit
ad582fa9c9
8 changed files with 75 additions and 1 deletions
|
|
@ -15,6 +15,8 @@ const char* cppast::to_string(cpp_entity_kind kind) noexcept
|
|||
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
return "macro definition";
|
||||
case cpp_entity_kind::include_directive_t:
|
||||
return "include directive";
|
||||
|
||||
case cpp_entity_kind::language_linkage_t:
|
||||
return "language linkage";
|
||||
|
|
@ -101,6 +103,7 @@ bool cppast::is_type(cpp_entity_kind kind) noexcept
|
|||
|
||||
case cpp_entity_kind::file_t:
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
case cpp_entity_kind::include_directive_t:
|
||||
case cpp_entity_kind::language_linkage_t:
|
||||
case cpp_entity_kind::namespace_t:
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
|
|
@ -148,6 +151,7 @@ bool cppast::is_template(cpp_entity_kind kind) noexcept
|
|||
|
||||
case cpp_entity_kind::file_t:
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
case cpp_entity_kind::include_directive_t:
|
||||
case cpp_entity_kind::language_linkage_t:
|
||||
case cpp_entity_kind::namespace_t:
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
|
|
|
|||
|
|
@ -12,3 +12,8 @@ cpp_entity_kind cpp_file::do_get_entity_kind() const noexcept
|
|||
{
|
||||
return cpp_entity_kind::file_t;
|
||||
}
|
||||
|
||||
bool detail::cpp_file_ref_predicate::operator()(const cpp_entity& e)
|
||||
{
|
||||
return e.kind() == cpp_entity_kind::file_t;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,3 +12,8 @@ cpp_entity_kind cpp_macro_definition::do_get_entity_kind() const noexcept
|
|||
{
|
||||
return cpp_entity_kind::macro_definition_t;
|
||||
}
|
||||
|
||||
cpp_entity_kind cpp_include_directive::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::include_directive_t;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ bool detail::visit(const cpp_entity& e, detail::visitor_callback_t cb, void* fun
|
|||
return handle_container<cpp_class_template_specialization>(e, cb, functor);
|
||||
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
case cpp_entity_kind::include_directive_t:
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
case cpp_entity_kind::using_directive_t:
|
||||
case cpp_entity_kind::using_declaration_t:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue