Add cpp_enum and cpp_enum_value

This commit is contained in:
Jonathan Müller 2017-01-21 22:44:53 +01:00
commit a2c54165bd
6 changed files with 142 additions and 2 deletions

View file

@ -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
View 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;
}