Add cpp_member_variable and cpp_bitfield
This commit is contained in:
parent
fe5eb5a047
commit
d2b5a79ba2
5 changed files with 108 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ const char* cppast::to_string(cpp_entity_kind kind) noexcept
|
|||
|
||||
case cpp_entity_kind::variable_t:
|
||||
return "variable";
|
||||
case cpp_entity_kind::member_variable_t:
|
||||
return "member variable";
|
||||
case cpp_entity_kind::bitfield_t:
|
||||
return "bit field";
|
||||
|
||||
case cpp_entity_kind::function_parameter_t:
|
||||
return "function parameter";
|
||||
|
|
@ -74,6 +78,8 @@ bool cppast::is_type(cpp_entity_kind kind) noexcept
|
|||
case cpp_entity_kind::access_specifier_t:
|
||||
case cpp_entity_kind::base_class_t:
|
||||
case cpp_entity_kind::variable_t:
|
||||
case cpp_entity_kind::member_variable_t:
|
||||
case cpp_entity_kind::bitfield_t:
|
||||
case cpp_entity_kind::function_parameter_t:
|
||||
case cpp_entity_kind::function_t:
|
||||
case cpp_entity_kind::count:
|
||||
|
|
|
|||
19
src/cpp_member_variable.cpp
Normal file
19
src/cpp_member_variable.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// 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_member_variable.hpp>
|
||||
|
||||
#include <cppast/cpp_entity_kind.hpp>
|
||||
|
||||
using namespace cppast;
|
||||
|
||||
cpp_entity_kind cpp_member_variable::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::member_variable_t;
|
||||
}
|
||||
|
||||
cpp_entity_kind cpp_bitfield::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::bitfield_t;
|
||||
}
|
||||
|
|
@ -59,6 +59,8 @@ bool detail::visit(const cpp_entity& e, detail::visitor_callback_t cb, void* fun
|
|||
case cpp_entity_kind::access_specifier_t:
|
||||
case cpp_entity_kind::base_class_t:
|
||||
case cpp_entity_kind::variable_t:
|
||||
case cpp_entity_kind::member_variable_t:
|
||||
case cpp_entity_kind::bitfield_t:
|
||||
case cpp_entity_kind::function_parameter_t:
|
||||
return cb(functor, e, visitor_info::leaf_entity);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue