From 21b64b2265f9d1aee5b0bb398363496119fb528a Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 11 Aug 2025 10:05:29 +0000 Subject: automatic import of PEGTL --- PEGTL-compiler-warning.patch | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 PEGTL-compiler-warning.patch (limited to 'PEGTL-compiler-warning.patch') diff --git a/PEGTL-compiler-warning.patch b/PEGTL-compiler-warning.patch new file mode 100644 index 0000000..d8bf7d7 --- /dev/null +++ b/PEGTL-compiler-warning.patch @@ -0,0 +1,32 @@ +diff --git a/include/tao/pegtl/contrib/rep_one_min_max.hpp b/include/tao/pegtl/contrib/rep_one_min_max.hpp +index 9173ad4a..2c9c25e6 100644 +--- a/include/tao/pegtl/contrib/rep_one_min_max.hpp ++++ b/include/tao/pegtl/contrib/rep_one_min_max.hpp +@@ -45,6 +45,27 @@ namespace tao + } + }; + ++ template< unsigned Max, char C > ++ struct rep_one_min_max< 0, Max, C > ++ { ++ using analyze_t = analysis::counted< analysis::rule_type::any, 0 >; ++ ++ template< typename Input > ++ static bool match( Input& in ) ++ { ++ const auto size = in.size( Max + 1 ); ++ std::size_t i = 0; ++ while( ( i < size ) && ( in.peek_char( i ) == C ) ) { ++ ++i; ++ } ++ if( i <= Max ) { ++ bump_help< result_on_found::success, Input, char, C >( in, i ); ++ return true; ++ } ++ return false; ++ } ++ }; ++ + template< unsigned Min, unsigned Max, char C > + struct skip_control< rep_one_min_max< Min, Max, C > > : std::true_type + { -- cgit v1.2.3