Add cpp_enum and cpp_enum_value
This commit is contained in:
parent
023ce3e87c
commit
a2c54165bd
6 changed files with 142 additions and 2 deletions
|
|
@ -10,11 +10,15 @@ bool cppast::is_type(cpp_entity_type type) noexcept
|
|||
{
|
||||
switch (type)
|
||||
{
|
||||
case cpp_entity_type::enum_t:
|
||||
return true;
|
||||
|
||||
case cpp_entity_type::file_t:
|
||||
case cpp_entity_type::namespace_t:
|
||||
case cpp_entity_type::namespace_alias_t:
|
||||
case cpp_entity_type::using_directive_t:
|
||||
case cpp_entity_type::using_declaration_t:
|
||||
case cpp_entity_type::enum_value_t:
|
||||
case cpp_entity_type::count:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
19
src/cpp_enum.cpp
Normal file
19
src/cpp_enum.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_enum.hpp>
|
||||
|
||||
#include <cppast/cpp_entity_type.hpp>
|
||||
|
||||
using namespace cppast;
|
||||
|
||||
cpp_entity_type cpp_enum_value::do_get_entity_type() const noexcept
|
||||
{
|
||||
return cpp_entity_type::enum_value_t;
|
||||
}
|
||||
|
||||
cpp_entity_type cpp_enum::do_get_entity_type() const noexcept
|
||||
{
|
||||
return cpp_entity_type::enum_t;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue