Skip to content

Commit

Permalink
Fix #370.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Sep 14, 2024
1 parent 8d73e29 commit be52732
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 3.2.8

Released 2024-09-14

* Fixed build with `-Wshorten-64-to-32`.

## 3.2.7

Released 2022-07-14
Expand Down
12 changes: 6 additions & 6 deletions include/tao/pegtl/contrib/trace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace TAO_PEGTL_NAMESPACE

void print_position() const
{
std::cerr << std::setw( indent() ) << ' ' << TracerTraits::ansi_position << "position" << TracerTraits::ansi_reset << ' ' << m_position << '\n';
std::cerr << std::setw( static_cast< int >( indent() ) ) << ' ' << TracerTraits::ansi_position << "position" << TracerTraits::ansi_reset << ' ' << m_position << '\n';
}

void update_position( const position& p )
Expand All @@ -98,7 +98,7 @@ namespace TAO_PEGTL_NAMESPACE
template< typename Rule, typename ParseInput, typename... States >
void start( const ParseInput& /*unused*/, States&&... /*unused*/ )
{
std::cerr << '#' << std::setw( indent() - 1 ) << ++m_count << TracerTraits::ansi_rule << demangle< Rule >() << TracerTraits::ansi_reset << '\n';
std::cerr << '#' << std::setw( static_cast< int >( indent() - 1 ) ) << ++m_count << TracerTraits::ansi_rule << demangle< Rule >() << TracerTraits::ansi_reset << '\n';
m_stack.push_back( m_count );
}

Expand All @@ -107,7 +107,7 @@ namespace TAO_PEGTL_NAMESPACE
{
const auto prev = m_stack.back();
m_stack.pop_back();
std::cerr << std::setw( indent() ) << ' ' << TracerTraits::ansi_success << "success" << TracerTraits::ansi_reset;
std::cerr << std::setw( static_cast< int >( indent() ) ) << ' ' << TracerTraits::ansi_success << "success" << TracerTraits::ansi_reset;
if( m_count != prev ) {
std::cerr << " #" << prev << ' ' << TracerTraits::ansi_hide << demangle< Rule >() << TracerTraits::ansi_reset;
}
Expand All @@ -120,7 +120,7 @@ namespace TAO_PEGTL_NAMESPACE
{
const auto prev = m_stack.back();
m_stack.pop_back();
std::cerr << std::setw( indent() ) << ' ' << TracerTraits::ansi_failure << "failure" << TracerTraits::ansi_reset;
std::cerr << std::setw( static_cast< int >( indent() ) ) << ' ' << TracerTraits::ansi_failure << "failure" << TracerTraits::ansi_reset;
if( m_count != prev ) {
std::cerr << " #" << prev << ' ' << TracerTraits::ansi_hide << demangle< Rule >() << TracerTraits::ansi_reset;
}
Expand All @@ -131,15 +131,15 @@ namespace TAO_PEGTL_NAMESPACE
template< typename Rule, typename ParseInput, typename... States >
void raise( const ParseInput& /*unused*/, States&&... /*unused*/ )
{
std::cerr << std::setw( indent() ) << ' ' << TracerTraits::ansi_raise << "raise" << TracerTraits::ansi_reset << ' ' << TracerTraits::ansi_rule << demangle< Rule >() << TracerTraits::ansi_reset << '\n';
std::cerr << std::setw( static_cast< int >( 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*/ )
{
const auto prev = m_stack.back();
m_stack.pop_back();
std::cerr << std::setw( indent() ) << ' ' << TracerTraits::ansi_unwind << "unwind" << TracerTraits::ansi_reset;
std::cerr << std::setw( static_cast< int >( indent() ) ) << ' ' << TracerTraits::ansi_unwind << "unwind" << TracerTraits::ansi_reset;
if( m_count != prev ) {
std::cerr << " #" << prev << ' ' << TracerTraits::ansi_hide << demangle< Rule >() << TracerTraits::ansi_reset;
}
Expand Down
4 changes: 2 additions & 2 deletions include/tao/pegtl/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#ifndef TAO_PEGTL_VERSION_HPP
#define TAO_PEGTL_VERSION_HPP

#define TAO_PEGTL_VERSION "3.2.7"
#define TAO_PEGTL_VERSION "3.2.8"

#define TAO_PEGTL_VERSION_MAJOR 3
#define TAO_PEGTL_VERSION_MINOR 2
#define TAO_PEGTL_VERSION_PATCH 7
#define TAO_PEGTL_VERSION_PATCH 8

#endif

0 comments on commit be52732

Please sign in to comment.