Add cpp_macro_definition
This commit is contained in:
parent
78157d43fc
commit
54b6c86e5b
5 changed files with 86 additions and 0 deletions
|
|
@ -13,6 +13,9 @@ const char* cppast::to_string(cpp_entity_kind kind) noexcept
|
|||
case cpp_entity_kind::file_t:
|
||||
return "file";
|
||||
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
return "macro definition";
|
||||
|
||||
case cpp_entity_kind::language_linkage_t:
|
||||
return "language linkage";
|
||||
|
||||
|
|
@ -97,6 +100,7 @@ bool cppast::is_type(cpp_entity_kind kind) noexcept
|
|||
return true;
|
||||
|
||||
case cpp_entity_kind::file_t:
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
case cpp_entity_kind::language_linkage_t:
|
||||
case cpp_entity_kind::namespace_t:
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
|
|
@ -143,6 +147,7 @@ bool cppast::is_template(cpp_entity_kind kind) noexcept
|
|||
return true;
|
||||
|
||||
case cpp_entity_kind::file_t:
|
||||
case cpp_entity_kind::macro_definition_t:
|
||||
case cpp_entity_kind::language_linkage_t:
|
||||
case cpp_entity_kind::namespace_t:
|
||||
case cpp_entity_kind::namespace_alias_t:
|
||||
|
|
|
|||
14
src/cpp_preprocessor.cpp
Normal file
14
src/cpp_preprocessor.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
|
||||
// This file is subject to the license terms in the LICENSE file
|
||||
// found in the top-level directory of this distribution.
|
||||
|
||||
#include <cppast/cpp_preprocessor.hpp>
|
||||
|
||||
#include <cppast/cpp_entity_kind.hpp>
|
||||
|
||||
using namespace cppast;
|
||||
|
||||
cpp_entity_kind cpp_macro_definition::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::macro_definition_t;
|
||||
}
|
||||
|
|
@ -77,6 +77,7 @@ bool detail::visit(const cpp_entity& e, detail::visitor_callback_t cb, void* fun
|
|||
case cpp_entity_kind::class_template_specialization_t:
|
||||
return handle_container<cpp_class_template_specialization>(e, cb, functor);
|
||||
|
||||
case cpp_entity_kind::macro_definition_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