Update copyright notices
This commit is contained in:
parent
373717cc5e
commit
62e571a4d6
133 changed files with 936 additions and 1103 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com>
|
||||
# This file is subject to the license terms in the LICENSE file
|
||||
# Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# found in the top-level directory of this distribution.
|
||||
|
||||
cmake_minimum_required(VERSION 3.11)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com>
|
||||
# This file is subject to the license terms in the LICENSE file
|
||||
# Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# found in the top-level directory of this distribution.
|
||||
|
||||
function(_cppast_example name)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// \file
|
||||
/// This is a very primitive version of the cppast tool.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// \file
|
||||
/// Generate equality comparisons.
|
||||
|
|
@ -80,48 +79,46 @@ void generate_op_non_equal(std::ostream& out, const cppast::cpp_class& c)
|
|||
// generate comparison operators for all classes in the file
|
||||
void generate_comparison(const cppast::cpp_file& file)
|
||||
{
|
||||
cppast::visit(file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit non-templated class definitions that have the attribute set
|
||||
return (!cppast::is_templated(e)
|
||||
&& e.kind() == cppast::cpp_entity_kind::class_t
|
||||
&& cppast::is_definition(e)
|
||||
&& cppast::has_attribute(e, "generate::comparison"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity())
|
||||
{
|
||||
// it is a new class
|
||||
auto& class_ = static_cast<const cppast::cpp_class&>(e);
|
||||
auto& attribute
|
||||
= cppast::has_attribute(e, "generate::comparison").value();
|
||||
cppast::visit(
|
||||
file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit non-templated class definitions that have the attribute set
|
||||
return (!cppast::is_templated(e) && e.kind() == cppast::cpp_entity_kind::class_t
|
||||
&& cppast::is_definition(e) && cppast::has_attribute(e, "generate::comparison"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity())
|
||||
{
|
||||
// it is a new class
|
||||
auto& class_ = static_cast<const cppast::cpp_class&>(e);
|
||||
auto& attribute = cppast::has_attribute(e, "generate::comparison").value();
|
||||
|
||||
// generate requested operators
|
||||
if (attribute.arguments())
|
||||
{
|
||||
if (has_token(attribute.arguments().value(), "=="))
|
||||
generate_op_equal(std::cout, class_);
|
||||
if (has_token(attribute.arguments().value(), "!="))
|
||||
generate_op_non_equal(std::cout, class_);
|
||||
}
|
||||
else
|
||||
{
|
||||
generate_op_equal(std::cout, class_);
|
||||
generate_op_non_equal(std::cout, class_);
|
||||
}
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
// generate requested operators
|
||||
if (attribute.arguments())
|
||||
{
|
||||
if (has_token(attribute.arguments().value(), "=="))
|
||||
generate_op_equal(std::cout, class_);
|
||||
if (has_token(attribute.arguments().value(), "!="))
|
||||
generate_op_non_equal(std::cout, class_);
|
||||
}
|
||||
else
|
||||
{
|
||||
generate_op_equal(std::cout, class_);
|
||||
generate_op_non_equal(std::cout, class_);
|
||||
}
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// \file
|
||||
/// A primitive documentation generator.
|
||||
|
|
@ -120,39 +119,39 @@ std::string generate_synopsis(const cppast::cpp_entity& e)
|
|||
void generate_documentation(const cppast::cpp_file& file)
|
||||
{
|
||||
// visit each entity
|
||||
cppast::visit(file,
|
||||
[](const cppast::cpp_entity& e, cppast::cpp_access_specifier_kind access) {
|
||||
if (is_excluded_documentation(e, access))
|
||||
// exclude this and all children
|
||||
return cppast::visit_filter::exclude_and_children;
|
||||
else if (cppast::is_templated(e) || cppast::is_friended(e))
|
||||
// continue on with children for a dummy entity
|
||||
return cppast::visit_filter::exclude;
|
||||
else
|
||||
return cppast::visit_filter::include;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (info.is_old_entity())
|
||||
// already done
|
||||
return;
|
||||
cppast::visit(
|
||||
file,
|
||||
[](const cppast::cpp_entity& e, cppast::cpp_access_specifier_kind access) {
|
||||
if (is_excluded_documentation(e, access))
|
||||
// exclude this and all children
|
||||
return cppast::visit_filter::exclude_and_children;
|
||||
else if (cppast::is_templated(e) || cppast::is_friended(e))
|
||||
// continue on with children for a dummy entity
|
||||
return cppast::visit_filter::exclude;
|
||||
else
|
||||
return cppast::visit_filter::include;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (info.is_old_entity())
|
||||
// already done
|
||||
return;
|
||||
|
||||
// print name
|
||||
std::cout << "## " << cppast::to_string(e.kind()) << " '" << e.name()
|
||||
<< "'\n";
|
||||
std::cout << '\n';
|
||||
// print name
|
||||
std::cout << "## " << cppast::to_string(e.kind()) << " '" << e.name() << "'\n";
|
||||
std::cout << '\n';
|
||||
|
||||
// print synopsis
|
||||
std::cout << "```\n";
|
||||
std::cout << generate_synopsis(e);
|
||||
std::cout << "```\n\n";
|
||||
// print synopsis
|
||||
std::cout << "```\n";
|
||||
std::cout << generate_synopsis(e);
|
||||
std::cout << "```\n\n";
|
||||
|
||||
// print documentation comment
|
||||
if (e.comment())
|
||||
std::cout << e.comment().value() << '\n';
|
||||
// print documentation comment
|
||||
if (e.comment())
|
||||
std::cout << e.comment().value() << '\n';
|
||||
|
||||
// print separator
|
||||
std::cout << "\n---\n\n";
|
||||
});
|
||||
// print separator
|
||||
std::cout << "\n---\n\n";
|
||||
});
|
||||
std::cout << "\n\n";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// \file
|
||||
/// Generates enum category functions.
|
||||
|
|
@ -55,68 +54,67 @@ const cppast::cpp_enum& get_enum(const cppast::cpp_entity_index& index,
|
|||
// generates the function definitions
|
||||
void generate_enum_category(const cppast::cpp_entity_index& index, const cppast::cpp_file& file)
|
||||
{
|
||||
cppast::visit(file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit function declarations that have the attribute set
|
||||
return (e.kind() == cppast::cpp_entity_kind::function_t
|
||||
&& !cppast::is_definition(e)
|
||||
&& cppast::has_attribute(e, "generate::enum_category"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[&](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::function_t)
|
||||
{
|
||||
// a new function, generate implementation
|
||||
assert(info.is_new_entity());
|
||||
cppast::visit(
|
||||
file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit function declarations that have the attribute set
|
||||
return (e.kind() == cppast::cpp_entity_kind::function_t && !cppast::is_definition(e)
|
||||
&& cppast::has_attribute(e, "generate::enum_category"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[&](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::function_t)
|
||||
{
|
||||
// a new function, generate implementation
|
||||
assert(info.is_new_entity());
|
||||
|
||||
auto category = cppast::has_attribute(e, "generate::enum_category")
|
||||
.value()
|
||||
.arguments()
|
||||
.value()
|
||||
.as_string();
|
||||
auto category = cppast::has_attribute(e, "generate::enum_category")
|
||||
.value()
|
||||
.arguments()
|
||||
.value()
|
||||
.as_string();
|
||||
|
||||
auto& func = static_cast<const cppast::cpp_function&>(e);
|
||||
// return type must be bool
|
||||
assert(func.return_type().kind() == cppast::cpp_type_kind::builtin_t
|
||||
&& static_cast<const cppast::cpp_builtin_type&>(func.return_type())
|
||||
.builtin_type_kind()
|
||||
== cppast::cpp_bool);
|
||||
auto& func = static_cast<const cppast::cpp_function&>(e);
|
||||
// return type must be bool
|
||||
assert(func.return_type().kind() == cppast::cpp_type_kind::builtin_t
|
||||
&& static_cast<const cppast::cpp_builtin_type&>(func.return_type())
|
||||
.builtin_type_kind()
|
||||
== cppast::cpp_bool);
|
||||
|
||||
// single parameter...
|
||||
assert(std::next(func.parameters().begin()) == func.parameters().end());
|
||||
auto& param = *func.parameters().begin();
|
||||
auto& enum_ = get_enum(index, param);
|
||||
// single parameter...
|
||||
assert(std::next(func.parameters().begin()) == func.parameters().end());
|
||||
auto& param = *func.parameters().begin();
|
||||
auto& enum_ = get_enum(index, param);
|
||||
|
||||
// generate function definition
|
||||
std::cout << "inline bool " << func.name() << "("
|
||||
<< cppast::to_string(param.type()) << " e) {\n";
|
||||
// generate function definition
|
||||
std::cout << "inline bool " << func.name() << "(" << cppast::to_string(param.type())
|
||||
<< " e) {\n";
|
||||
|
||||
// generate switch
|
||||
std::cout << " switch (e) {\n";
|
||||
for (const auto& enumerator : enum_)
|
||||
{
|
||||
std::cout << " case " << enum_.name() << "::" << enumerator.name()
|
||||
<< ":\n";
|
||||
if (is_category(enumerator, category))
|
||||
std::cout << " return true;\n";
|
||||
else
|
||||
std::cout << " return false;\n";
|
||||
}
|
||||
std::cout << " }\n";
|
||||
// generate switch
|
||||
std::cout << " switch (e) {\n";
|
||||
for (const auto& enumerator : enum_)
|
||||
{
|
||||
std::cout << " case " << enum_.name() << "::" << enumerator.name() << ":\n";
|
||||
if (is_category(enumerator, category))
|
||||
std::cout << " return true;\n";
|
||||
else
|
||||
std::cout << " return false;\n";
|
||||
}
|
||||
std::cout << " }\n";
|
||||
|
||||
std::cout << "}\n\n";
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
std::cout << "}\n\n";
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// \file
|
||||
/// Generates enum `to_string()` code.
|
||||
|
|
@ -17,55 +16,51 @@
|
|||
|
||||
void generate_to_string(const cppast::cpp_file& file)
|
||||
{
|
||||
cppast::visit(file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit enum definitions that have the attribute set
|
||||
return (e.kind() == cppast::cpp_entity_kind::enum_t
|
||||
&& cppast::is_definition(e)
|
||||
&& cppast::has_attribute(e, "generate::to_string"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::enum_t && !info.is_old_entity())
|
||||
{
|
||||
// a new enum, generate to string function
|
||||
auto& enum_ = static_cast<const cppast::cpp_enum&>(e);
|
||||
cppast::visit(
|
||||
file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit enum definitions that have the attribute set
|
||||
return (e.kind() == cppast::cpp_entity_kind::enum_t && cppast::is_definition(e)
|
||||
&& cppast::has_attribute(e, "generate::to_string"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::enum_t && !info.is_old_entity())
|
||||
{
|
||||
// a new enum, generate to string function
|
||||
auto& enum_ = static_cast<const cppast::cpp_enum&>(e);
|
||||
|
||||
// write function header
|
||||
std::cout << "inline const char* to_string(const " << enum_.name()
|
||||
<< "& e) {\n";
|
||||
// write function header
|
||||
std::cout << "inline const char* to_string(const " << enum_.name() << "& e) {\n";
|
||||
|
||||
// generate switch
|
||||
std::cout << " switch (e) {\n";
|
||||
for (const auto& enumerator : enum_)
|
||||
{
|
||||
std::cout << " case " << enum_.name() << "::" << enumerator.name()
|
||||
<< ":\n";
|
||||
// generate switch
|
||||
std::cout << " switch (e) {\n";
|
||||
for (const auto& enumerator : enum_)
|
||||
{
|
||||
std::cout << " case " << enum_.name() << "::" << enumerator.name() << ":\n";
|
||||
|
||||
// attribute can be used to override the string
|
||||
if (auto attr
|
||||
= cppast::has_attribute(enumerator, "generate::to_string"))
|
||||
std::cout << " return "
|
||||
<< attr.value().arguments().value().as_string()
|
||||
<< ";\n";
|
||||
else
|
||||
std::cout << " return \"" << enumerator.name() << "\";\n";
|
||||
}
|
||||
std::cout << " }\n";
|
||||
// attribute can be used to override the string
|
||||
if (auto attr = cppast::has_attribute(enumerator, "generate::to_string"))
|
||||
std::cout << " return " << attr.value().arguments().value().as_string()
|
||||
<< ";\n";
|
||||
else
|
||||
std::cout << " return \"" << enumerator.name() << "\";\n";
|
||||
}
|
||||
std::cout << " }\n";
|
||||
|
||||
std::cout << "}\n\n";
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
std::cout << "}\n\n";
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_EXAMPLE_PARSER_HPP_INCLUDED
|
||||
#define CPPAST_EXAMPLE_PARSER_HPP_INCLUDED
|
||||
|
|
@ -13,7 +12,8 @@
|
|||
// parses all files in that directory
|
||||
// and invokes the callback for each of them
|
||||
template <typename Callback>
|
||||
int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index, Callback cb) try
|
||||
int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index, Callback cb)
|
||||
try
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/// \file
|
||||
/// Serialization code generation.
|
||||
|
|
@ -69,52 +68,50 @@ void generate_serialize_member(std::ostream& out, const cppast::cpp_member_varia
|
|||
// generate serialization function
|
||||
void generate_serialize(const cppast::cpp_file& file)
|
||||
{
|
||||
cppast::visit(file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit non-templated class definitions that have the attribute set
|
||||
return (!cppast::is_templated(e)
|
||||
&& e.kind() == cppast::cpp_entity_kind::class_t
|
||||
&& cppast::is_definition(e)
|
||||
&& cppast::has_attribute(e, "generate::serialize"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity())
|
||||
{
|
||||
auto& class_ = static_cast<const cppast::cpp_class&>(e);
|
||||
cppast::visit(
|
||||
file,
|
||||
[](const cppast::cpp_entity& e) {
|
||||
// only visit non-templated class definitions that have the attribute set
|
||||
return (!cppast::is_templated(e) && e.kind() == cppast::cpp_entity_kind::class_t
|
||||
&& cppast::is_definition(e) && cppast::has_attribute(e, "generate::serialize"))
|
||||
// or all namespaces
|
||||
|| e.kind() == cppast::cpp_entity_kind::namespace_t;
|
||||
},
|
||||
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
|
||||
if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity())
|
||||
{
|
||||
auto& class_ = static_cast<const cppast::cpp_class&>(e);
|
||||
|
||||
std::cout << "inline void serialize(const foo::serializer& s, const "
|
||||
<< class_.name() << "& obj) {\n";
|
||||
std::cout << "inline void serialize(const foo::serializer& s, const "
|
||||
<< class_.name() << "& obj) {\n";
|
||||
|
||||
// serialize base classes
|
||||
for (auto& base : class_.bases())
|
||||
if (!cppast::has_attribute(base, "generate::transient"))
|
||||
std::cout << " serialize(s, static_cast<const " << base.name()
|
||||
<< "&>(obj));\n";
|
||||
// serialize base classes
|
||||
for (auto& base : class_.bases())
|
||||
if (!cppast::has_attribute(base, "generate::transient"))
|
||||
std::cout << " serialize(s, static_cast<const " << base.name()
|
||||
<< "&>(obj));\n";
|
||||
|
||||
// serialize member variables
|
||||
for (auto& member : class_)
|
||||
{
|
||||
if (member.kind() == cppast::cpp_entity_kind::member_variable_t)
|
||||
generate_serialize_member(std::cout,
|
||||
static_cast<
|
||||
const cppast::cpp_member_variable&>(
|
||||
member));
|
||||
}
|
||||
// serialize member variables
|
||||
for (auto& member : class_)
|
||||
{
|
||||
if (member.kind() == cppast::cpp_entity_kind::member_variable_t)
|
||||
generate_serialize_member(std::cout,
|
||||
static_cast<const cppast::cpp_member_variable&>(
|
||||
member));
|
||||
}
|
||||
|
||||
std::cout << "}\n\n";
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
std::cout << "}\n\n";
|
||||
}
|
||||
else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
|
||||
{
|
||||
if (info.event == cppast::visitor_info::container_entity_enter)
|
||||
// open namespace
|
||||
std::cout << "namespace " << e.name() << " {\n\n";
|
||||
else // if (info.event == cppast::visitor_info::container_entity_exit)
|
||||
// close namespace
|
||||
std::cout << "}\n";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
|
|
|||
2
external/external.cmake
vendored
2
external/external.cmake
vendored
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
|
||||
# This file is subject to the license terms in the LICENSE file
|
||||
# SPDX-License-Identifier: MIT
|
||||
# found in the top-level directory of this distribution.
|
||||
|
||||
include(FetchContent)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CODE_GENERATOR_HPP_INCLUDED
|
||||
#define CPPAST_CODE_GENERATOR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_COMPILE_CONFIG_HPP_INCLUDED
|
||||
#define CPPAST_COMPILE_CONFIG_HPP_INCLUDED
|
||||
|
|
@ -11,8 +10,8 @@
|
|||
#include <type_safe/flag_set.hpp>
|
||||
#include <type_safe/reference.hpp>
|
||||
|
||||
#include <cppast/detail/assert.hpp>
|
||||
#include <cppast/cppast_fwd.hpp>
|
||||
#include <cppast/detail/assert.hpp>
|
||||
|
||||
namespace cppast
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ALIAS_TEMPLATE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ALIAS_TEMPLATE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ARRAY_TYPE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ARRAY_TYPE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ATTRIBUTE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ATTRIBUTE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_CLASS_HPP_INCLUDED
|
||||
#define CPPAST_CPP_CLASS_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_DECLTYPE_TYPE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_DECLTYPE_TYPE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ENTITY_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ENTITY_HPP_INCLUDED
|
||||
|
|
@ -151,7 +150,7 @@ public:
|
|||
{
|
||||
user_data_ = data;
|
||||
}
|
||||
|
||||
|
||||
/// \effects Creates it giving it the the name.
|
||||
cpp_entity(std::string name) : name_(std::move(name)), user_data_(nullptr) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ENTITY_CONTAINER_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ENTITY_CONTAINER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ENTITY_INDEX_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ENTITY_INDEX_HPP_INCLUDED
|
||||
|
|
@ -104,8 +103,8 @@ public:
|
|||
/// \returns A [ts::optional_ref]() corresponding to the entity of the given
|
||||
/// [cppast::cpp_entity_id](). If no definition has been registered, it returns an empty
|
||||
/// optional. \notes This operation is thread safe.
|
||||
type_safe::optional_ref<const cpp_entity> lookup_definition(const cpp_entity_id& id) const
|
||||
noexcept;
|
||||
type_safe::optional_ref<const cpp_entity> lookup_definition(
|
||||
const cpp_entity_id& id) const noexcept;
|
||||
|
||||
/// \returns A [ts::array_ref]() of references to all namespaces matching the given
|
||||
/// [cppast::cpp_entity_id](). If no namespace is found, it returns an empty array reference.
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED
|
||||
|
||||
#include <cppast/detail/assert.hpp>
|
||||
#include <cppast/cppast_fwd.hpp>
|
||||
#include <cppast/detail/assert.hpp>
|
||||
|
||||
namespace cppast
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ENTITY_REF_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ENTITY_REF_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_ENUM_HPP_INCLUDED
|
||||
#define CPPAST_CPP_ENUM_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_EXPRESSION_HPP_INCLUDED
|
||||
#define CPPAST_CPP_EXPRESSION_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_FILE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_FILE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_FORWARD_DECLARABLE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_FORWARD_DECLARABLE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_FRIEND_HPP_INCLUDED
|
||||
#define CPPAST_CPP_FRIEND_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_FUNCTION_HPP_INCLUDED
|
||||
#define CPPAST_CPP_FUNCTION_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_FUNCTION_TEMPLATE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_FUNCTION_TEMPLATE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_FUNCTION_TYPE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_FUNCTION_TYPE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_LANGUAGE_LINKAGE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_LANGUAGE_LINKAGE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_MEMBER_FUNCTION_HPP_INCLUDED
|
||||
#define CPPAST_CPP_MEMBER_FUNCTION_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_MEMBER_VARIABLE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_MEMBER_VARIABLE_HPP_INCLUDED
|
||||
|
|
@ -19,7 +18,7 @@ public:
|
|||
{
|
||||
return mutable_;
|
||||
}
|
||||
|
||||
|
||||
cpp_member_variable_base(std::string name, std::unique_ptr<cpp_type> type,
|
||||
std::unique_ptr<cpp_expression> def, bool is_mutable)
|
||||
: cpp_entity(std::move(name)), cpp_variable_base(std::move(type), std::move(def)),
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_NAMESPACE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_NAMESPACE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_PREPROCESSOR_HPP_INCLUDED
|
||||
#define CPPAST_CPP_PREPROCESSOR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_STATIC_ASSERT_HPP_INCLUDED
|
||||
#define CPPAST_CPP_STATIC_ASSERT_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_STORAGE_CLASS_SPECIFIERS_HPP_INCLUDED
|
||||
#define CPPAST_CPP_STORAGE_CLASS_SPECIFIERS_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_TEMPLATE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_TEMPLATE_HPP_INCLUDED
|
||||
|
|
@ -143,8 +142,8 @@ public:
|
|||
|
||||
/// \returns An array ref to the [cppast::cpp_template_argument](), if there are any.
|
||||
/// \requires The arguments are exposed, i.e. `arguments_exposed()` returns `true`.
|
||||
type_safe::optional<type_safe::array_ref<const cpp_template_argument>> arguments() const
|
||||
noexcept
|
||||
type_safe::optional<type_safe::array_ref<const cpp_template_argument>> arguments()
|
||||
const noexcept
|
||||
{
|
||||
auto& vec = arguments_.value(type_safe::variant_type<std::vector<cpp_template_argument>>{});
|
||||
if (vec.empty())
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_TEMPLATE_PARAMETER_HPP_INCLUDED
|
||||
#define CPPAST_CPP_TEMPLATE_PARAMETER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_TOKEN_HPP_INCLUDED
|
||||
#define CPPAST_CPP_TOKEN_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_TYPE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_TYPE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_TYPE_ALIAS_HPP_INCLUDED
|
||||
#define CPPAST_CPP_TYPE_ALIAS_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_VARIABLE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_VARIABLE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_VARIABLE_BASE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_VARIABLE_BASE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CPP_VARIABLE_TEMPLATE_HPP_INCLUDED
|
||||
#define CPPAST_CPP_VARIABLE_TEMPLATE_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2021 Julian Rüth <julian.rueth@fsfe.org>
|
||||
// This file is subject to the license terms in the LICENSE file
|
||||
// found in the top-level directory of this distribution.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_FORWARD_HPP_INCLUDED
|
||||
#define CPPAST_FORWARD_HPP_INCLUDED
|
||||
|
|
@ -118,9 +117,12 @@ struct source_location;
|
|||
struct visitor_info;
|
||||
struct whitespace_t;
|
||||
|
||||
template <class Derived, typename T> class cpp_entity_container;
|
||||
template <class Parser> class simple_file_parser;
|
||||
template <typename T, typename Predicate> class basic_cpp_entity_ref;
|
||||
template <class Derived, typename T>
|
||||
class cpp_entity_container;
|
||||
template <class Parser>
|
||||
class simple_file_parser;
|
||||
template <typename T, typename Predicate>
|
||||
class basic_cpp_entity_ref;
|
||||
|
||||
} // namespace cppast
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_ASSERT_HPP_INCLUDED
|
||||
#define CPPAST_ASSERT_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_INTRUSIVE_LIST_HPP_INCLUDED
|
||||
#define CPPAST_INTRUSIVE_LIST_HPP_INCLUDED
|
||||
|
|
@ -10,8 +9,8 @@
|
|||
|
||||
#include <type_safe/optional_ref.hpp>
|
||||
|
||||
#include <cppast/detail/assert.hpp>
|
||||
#include <cppast/cppast_fwd.hpp>
|
||||
#include <cppast/detail/assert.hpp>
|
||||
|
||||
namespace cppast
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_DIAGNOSTIC_HPP_INCLUDED
|
||||
#define CPPAST_DIAGNOSTIC_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_DIAGNOSTIC_LOGGER_HPP_INCLUDED
|
||||
#define CPPAST_DIAGNOSTIC_LOGGER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_LIBCLANG_PARSER_HPP_INCLUDED
|
||||
#define CPPAST_LIBCLANG_PARSER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_PARSER_HPP_INCLUDED
|
||||
#define CPPAST_PARSER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_VISITOR_HPP_INCLUDED
|
||||
#define CPPAST_VISITOR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com>
|
||||
# This file is subject to the license terms in the LICENSE file
|
||||
# Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
# found in the top-level directory of this distribution.
|
||||
|
||||
set(detail_header
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/code_generator.hpp>
|
||||
|
||||
|
|
@ -292,11 +291,10 @@ bool generate_enum(code_generator& generator, const cpp_enum& e,
|
|||
output << opening_brace;
|
||||
output.indent();
|
||||
|
||||
auto need_sep = write_container(output, e,
|
||||
[](const code_generator::output& out) {
|
||||
out << punctuation(",") << newl;
|
||||
},
|
||||
cur_access);
|
||||
auto need_sep = write_container(
|
||||
output, e,
|
||||
[](const code_generator::output& out) { out << punctuation(",") << newl; },
|
||||
cur_access);
|
||||
if (need_sep)
|
||||
output << newl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_alias_template.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_attribute.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_class.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_class_template.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_entity.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_entity_index.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_entity_kind.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_enum.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_expression.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_file.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_forward_declarable.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_friend.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_function.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_function_template.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_language_linkage.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_member_function.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_member_variable.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_namespace.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_preprocessor.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_static_assert.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_template_parameter.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_token.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_type.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_type_alias.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_variable.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_variable_template.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/diagnostic_logger.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <clang-c/Index.h>
|
||||
#include <cppast/cpp_class.hpp>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "cxtokenizer.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_CXTOKENIZER_HPP_INCLUDED
|
||||
#define CPPAST_CXTOKENIZER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "debug_helper.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_DEBUG_HELPER_HPP_INCLUDED
|
||||
#define CPPAST_DEBUG_HELPER_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_enum.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_expression.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_friend.hpp>
|
||||
|
||||
|
|
@ -45,8 +44,8 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_friend(const detail::parse_context
|
|||
// as then the class name would be wrong
|
||||
auto name = detail::get_cursor_name(referenced);
|
||||
type = cpp_user_defined_type::build(
|
||||
cpp_type_ref(detail::get_entity_id(referenced),
|
||||
namespace_str + "::" + name.c_str()));
|
||||
cpp_type_ref(detail::get_entity_id(referenced),
|
||||
namespace_str + "::" + name.c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/cpp_function.hpp>
|
||||
#include <cppast/cpp_member_function.hpp>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "parse_functions.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <cppast/libclang_parser.hpp>
|
||||
|
||||
|
|
@ -494,7 +493,7 @@ namespace
|
|||
std::vector<const char*> get_arguments(const libclang_compile_config& config)
|
||||
{
|
||||
std::vector<const char*> args
|
||||
// TODO: Why? and Why?
|
||||
// TODO: Why? and Why?
|
||||
= {"-x", "c++", "-I."}; // force C++ and enable current directory for include search
|
||||
for (auto& flag : detail::libclang_compile_config_access::flags(config))
|
||||
args.push_back(flag.c_str());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_LIBCLANG_VISITOR_HPP_INCLUDED
|
||||
#define CPPAST_LIBCLANG_VISITOR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "parse_functions.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_PARSE_ERROR_HPP_INCLUDED
|
||||
#define CPPAST_PARSE_ERROR_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "parse_functions.hpp"
|
||||
|
||||
|
|
@ -108,7 +107,8 @@ bool is_friend(const CXCursor& parent_cur)
|
|||
|
||||
std::unique_ptr<cpp_entity> detail::parse_entity(const detail::parse_context& context,
|
||||
cpp_entity* parent, const CXCursor& cur,
|
||||
const CXCursor& parent_cur) try
|
||||
const CXCursor& parent_cur)
|
||||
try
|
||||
{
|
||||
if (context.logger->is_verbose())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#ifndef CPPAST_PARSE_FUNCTIONS_HPP_INCLUDED
|
||||
#define CPPAST_PARSE_FUNCTIONS_HPP_INCLUDED
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright (C) 2017-2019 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.
|
||||
// Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "preprocessor.hpp"
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue