Skip to content

Commit

Permalink
Fix ellipsis formatting craziness.
Browse files Browse the repository at this point in the history
  • Loading branch information
furby-tm committed Aug 6, 2024
1 parent 1abafd4 commit 9009b60
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 38 deletions.
6 changes: 3 additions & 3 deletions Sources/Pegtl/include/Pegtl/control_action.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ struct control_action : maybe_nothing {
}

template<typename ParseInput, typename... States>
static void start(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
static void start(const ParseInput & /*unused*/, States &&...) noexcept
{
}

template<typename ParseInput, typename... States>
static void success(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
static void success(const ParseInput & /*unused*/, States &&...) noexcept
{
}

template<typename ParseInput, typename... States>
static void failure(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
static void failure(const ParseInput & /*unused*/, States &&...) noexcept
{
}

Expand Down
14 changes: 7 additions & 7 deletions Sources/Pegtl/include/Pegtl/coverage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct coverage_state {
std::vector<std::string_view> stack;

template<typename Rule, typename ParseInput, typename... States>
void start(const ParseInput & /*unused*/, States &&.*unused*/)
void start(const ParseInput & /*unused*/, States &&...)
{
const auto name = demangle<Rule>();
++result.at(name).start;
Expand All @@ -72,7 +72,7 @@ struct coverage_state {
}

template<typename Rule, typename ParseInput, typename... States>
void success(const ParseInput & /*unused*/, States &&.*unused*/)
void success(const ParseInput & /*unused*/, States &&...)
{
stack.pop_back();
const auto name = demangle<Rule>();
Expand All @@ -83,7 +83,7 @@ struct coverage_state {
}

template<typename Rule, typename ParseInput, typename... States>
void failure(const ParseInput & /*unused*/, States &&.*unused*/)
void failure(const ParseInput & /*unused*/, States &&...)
{
stack.pop_back();
const auto name = demangle<Rule>();
Expand All @@ -94,7 +94,7 @@ struct coverage_state {
}

template<typename Rule, typename ParseInput, typename... States>
void raise(const ParseInput & /*unused*/, States &&.*unused*/)
void raise(const ParseInput & /*unused*/, States &&...)
{
const auto name = demangle<Rule>();
++result.at(name).raise;
Expand All @@ -104,7 +104,7 @@ struct coverage_state {
}

template<typename Rule, typename ParseInput, typename... States>
void unwind(const ParseInput & /*unused*/, States &&.*unused*/)
void unwind(const ParseInput & /*unused*/, States &&...)
{
stack.pop_back();
const auto name = demangle<Rule>();
Expand All @@ -115,12 +115,12 @@ struct coverage_state {
}

template<typename Rule, typename ParseInput, typename... States>
void apply(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
void apply(const ParseInput & /*unused*/, States &&...) noexcept
{
}

template<typename Rule, typename ParseInput, typename... States>
void apply0(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
void apply0(const ParseInput & /*unused*/, States &&...) noexcept
{
}
};
Expand Down
4 changes: 2 additions & 2 deletions Sources/Pegtl/include/Pegtl/http.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ struct chunk_size {
class Control,
typename ParseInput,
typename... States>
[[nodiscard]] static bool match(ParseInput &in, std::size_t &size, States &&.*unused*/)
[[nodiscard]] static bool match(ParseInput &in, std::size_t &size, States &&...)
{
size = 0;
std::size_t i = 0;
Expand Down Expand Up @@ -186,7 +186,7 @@ struct chunk_data {
class Control,
typename ParseInput,
typename... States>
[[nodiscard]] static bool match(ParseInput &in, const std::size_t size, States &&.*unused*/)
[[nodiscard]] static bool match(ParseInput &in, const std::size_t size, States &&...)
{
if (in.size(size) >= size) {
in.bump(size);
Expand Down
6 changes: 3 additions & 3 deletions Sources/Pegtl/include/Pegtl/integer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ struct unsigned_rule_with_action {
class Control,
typename ParseInput,
typename... States>
[[nodiscard]] static auto match(ParseInput &in, States &&.*unused*/) noexcept(
[[nodiscard]] static auto match(ParseInput &in, States &&...) noexcept(
noexcept(in.empty())) -> std::enable_if_t<A == apply_mode::nothing, bool>
{
return internal::match_unsigned(in); // Does not check for any overflow.
Expand Down Expand Up @@ -328,7 +328,7 @@ struct maximum_rule_with_action {
class Control,
typename ParseInput,
typename... States>
[[nodiscard]] static auto match(ParseInput &in, States &&.*unused*/)
[[nodiscard]] static auto match(ParseInput &in, States &&...)
-> std::enable_if_t<A == apply_mode::nothing, bool>
{
Unsigned st = 0;
Expand Down Expand Up @@ -399,7 +399,7 @@ struct signed_rule_with_action {
class Control,
typename ParseInput,
typename... States>
[[nodiscard]] static auto match(ParseInput &in, States &&.*unused*/) noexcept(
[[nodiscard]] static auto match(ParseInput &in, States &&...) noexcept(
noexcept(in.empty())) -> std::enable_if_t<A == apply_mode::nothing, bool>
{
return PXR_PEGTL_NAMESPACE::parse<signed_rule_new>(in); // Does not check for any overflow.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pegtl/include/Pegtl/match.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ template<typename Rule,
typename ParseInput,
typename... States>
[[nodiscard]] static auto match_no_control(ParseInput &in,
States &&.*unused*/) -> decltype(Rule::match(in))
States &&...) -> decltype(Rule::match(in))
{
return Rule::match(in);
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/Pegtl/include/Pegtl/normal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ template<typename Rule> struct normal {
static constexpr bool enable = internal::enable_control<Rule>;

template<typename ParseInput, typename... States>
static void start(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
static void start(const ParseInput & /*unused*/, States &&...) noexcept
{
}

template<typename ParseInput, typename... States>
static void success(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
static void success(const ParseInput & /*unused*/, States &&...) noexcept
{
}

template<typename ParseInput, typename... States>
static void failure(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
static void failure(const ParseInput & /*unused*/, States &&...) noexcept
{
}

template<typename ParseInput, typename... States>
[[noreturn]] static void raise(const ParseInput &in, States &&.*unused*/)
[[noreturn]] static void raise(const ParseInput &in, States &&...)
{
#if defined(__cpp_exceptions)
throw parse_error("parse error matching " + std::string(demangle<Rule>()), in);
Expand Down
20 changes: 10 additions & 10 deletions Sources/Pegtl/include/Pegtl/parse_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ template<typename T, typename Source = std::string_view> struct basic_node {
return {m_begin.data, m_end.data, source, m_begin.byte, m_begin.line, m_begin.column};
}

template<typename... States> void remove_content(States &&.*unused*/) noexcept
template<typename... States> void remove_content(States &&...) noexcept
{
m_end = PXR_PEGTL_NAMESPACE::internal::iterator();
}

// all non-root nodes are initialized by calling this method
template<typename Rule, typename ParseInput, typename... States>
void start(const ParseInput &in, States &&.*unused*/)
void start(const ParseInput &in, States &&...)
{
set_type<Rule>();
source = in.source();
Expand All @@ -122,14 +122,14 @@ template<typename T, typename Source = std::string_view> struct basic_node {

// if parsing of the rule succeeded, this method is called
template<typename Rule, typename ParseInput, typename... States>
void success(const ParseInput &in, States &&.*unused*/) noexcept
void success(const ParseInput &in, States &&...) noexcept
{
m_end = PXR_PEGTL_NAMESPACE::internal::iterator(in.iterator());
}

// if parsing of the rule failed, this method is called
template<typename Rule, typename ParseInput, typename... States>
void failure(const ParseInput & /*unused*/, States &&.*unused*/) noexcept
void failure(const ParseInput & /*unused*/, States &&...) noexcept
{
}

Expand All @@ -138,7 +138,7 @@ template<typename T, typename Source = std::string_view> struct basic_node {
// note that "child" is the node whose Rule just succeeded
// and "*this" is the parent where the node should be appended.
template<typename... States>
void emplace_back(std::unique_ptr<node_t> &&child, States &&.*unused*/)
void emplace_back(std::unique_ptr<node_t> &&child, States &&...)
{
assert(child);
children.emplace_back(std::move(child));
Expand Down Expand Up @@ -175,7 +175,7 @@ template<typename Node> struct state {
};

template<typename Selector, typename... Parameters>
void transform(Parameters &&.*unused*/) noexcept
void transform(Parameters &&...) noexcept
{
}

Expand Down Expand Up @@ -246,13 +246,13 @@ struct make_control<Node, Selector, Control>::state_handler<Rule, false, false>
static constexpr bool enable = true;

template<typename ParseInput, typename... States>
static void start(const ParseInput & /*unused*/, state<Node> &state, States &&.*unused*/)
static void start(const ParseInput & /*unused*/, state<Node> &state, States &&...)
{
state.emplace_back();
}

template<typename ParseInput, typename... States>
static void success(const ParseInput & /*unused*/, state<Node> &state, States &&.*unused*/)
static void success(const ParseInput & /*unused*/, state<Node> &state, States &&...)
{
auto n = std::move(state.back());
state.pop_back();
Expand All @@ -262,13 +262,13 @@ struct make_control<Node, Selector, Control>::state_handler<Rule, false, false>
}

template<typename ParseInput, typename... States>
static void failure(const ParseInput & /*unused*/, state<Node> &state, States &&.*unused*/)
static void failure(const ParseInput & /*unused*/, state<Node> &state, States &&...)
{
state.pop_back();
}

template<typename ParseInput, typename... States>
static void unwind(const ParseInput & /*unused*/, state<Node> &state, States &&.*unused*/)
static void unwind(const ParseInput & /*unused*/, state<Node> &state, States &&...)
{
state.pop_back();
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Pegtl/include/Pegtl/raw_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ template<typename Cond> struct raw_string_until<Cond> {
typename... States>
[[nodiscard]] static bool match(ParseInput &in,
const std::size_t &marker_size,
States &&.*unused*/)
States &&...)
{
auto m = in.template mark<M>();

Expand Down
14 changes: 7 additions & 7 deletions Sources/Pegtl/include/Pegtl/trace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ template<typename TracerTraits> struct tracer {
}

template<typename Rule, typename ParseInput, typename... States>
void start(const ParseInput & /*unused*/, States &&.*unused*/)
void start(const ParseInput & /*unused*/, States &&...)
{
std::cerr << '#' << std::setw(indent() - 1) << ++m_count << TracerTraits::ansi_rule
<< demangle<Rule>() << TracerTraits::ansi_reset << '\n';
m_stack.push_back(m_count);
}

template<typename Rule, typename ParseInput, typename... States>
void success(const ParseInput &in, States &&.*unused*/)
void success(const ParseInput &in, States &&...)
{
const auto prev = m_stack.back();
m_stack.pop_back();
Expand All @@ -116,7 +116,7 @@ template<typename TracerTraits> struct tracer {
}

template<typename Rule, typename ParseInput, typename... States>
void failure(const ParseInput &in, States &&.*unused*/)
void failure(const ParseInput &in, States &&...)
{
const auto prev = m_stack.back();
m_stack.pop_back();
Expand All @@ -131,15 +131,15 @@ template<typename TracerTraits> struct tracer {
}

template<typename Rule, typename ParseInput, typename... States>
void raise(const ParseInput & /*unused*/, States &&.*unused*/)
void raise(const ParseInput & /*unused*/, States &&...)
{
std::cerr << std::setw(indent()) << ' ' << TracerTraits::ansi_raise << "raise"
<< TracerTraits::ansi_reset << ' ' << TracerTraits::ansi_rule << demangle<Rule>()
<< TracerTraits::ansi_reset << '\n';
}

template<typename Rule, typename ParseInput, typename... States>
void unwind(const ParseInput &in, States &&.*unused*/)
void unwind(const ParseInput &in, States &&...)
{
const auto prev = m_stack.back();
m_stack.pop_back();
Expand All @@ -154,14 +154,14 @@ template<typename TracerTraits> struct tracer {
}

template<typename Rule, typename ParseInput, typename... States>
void apply(const ParseInput & /*unused*/, States &&.*unused*/)
void apply(const ParseInput & /*unused*/, States &&...)
{
std::cerr << std::setw(static_cast<int>(indent() - TracerTraits::indent_increment)) << ' '
<< TracerTraits::ansi_apply << "apply" << TracerTraits::ansi_reset << '\n';
}

template<typename Rule, typename ParseInput, typename... States>
void apply0(const ParseInput & /*unused*/, States &&.*unused*/)
void apply0(const ParseInput & /*unused*/, States &&...)
{
std::cerr << std::setw(static_cast<int>(indent() - TracerTraits::indent_increment)) << ' '
<< TracerTraits::ansi_apply << "apply0" << TracerTraits::ansi_reset << '\n';
Expand Down

0 comments on commit 9009b60

Please sign in to comment.