Parse cpp_variable
This commit is contained in:
parent
76f4136c86
commit
51bdbca81d
12 changed files with 281 additions and 58 deletions
|
|
@ -8,10 +8,16 @@
|
|||
|
||||
using namespace cppast;
|
||||
|
||||
cpp_entity_kind cpp_variable::kind() noexcept
|
||||
{
|
||||
return cpp_entity_kind::variable_t;
|
||||
}
|
||||
|
||||
std::unique_ptr<cpp_variable> cpp_variable::build(const cpp_entity_index& idx, cpp_entity_id id,
|
||||
std::string name, std::unique_ptr<cpp_type> type,
|
||||
std::unique_ptr<cpp_expression> def,
|
||||
cpp_storage_specifiers spec, bool is_constexpr)
|
||||
cpp_storage_class_specifiers spec,
|
||||
bool is_constexpr)
|
||||
{
|
||||
auto result = std::unique_ptr<cpp_variable>(
|
||||
new cpp_variable(std::move(name), std::move(type), std::move(def), spec, is_constexpr));
|
||||
|
|
@ -21,5 +27,5 @@ std::unique_ptr<cpp_variable> cpp_variable::build(const cpp_entity_index& idx, c
|
|||
|
||||
cpp_entity_kind cpp_variable::do_get_entity_kind() const noexcept
|
||||
{
|
||||
return cpp_entity_kind::variable_t;
|
||||
return kind();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue