diff options
Diffstat (limited to '')
-rw-r--r-- | MoonParser/pegtl/internal/bump_help.hpp | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/MoonParser/pegtl/internal/bump_help.hpp b/MoonParser/pegtl/internal/bump_help.hpp deleted file mode 100644 index 577870e..0000000 --- a/MoonParser/pegtl/internal/bump_help.hpp +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | // Copyright (c) 2015-2017 Dr. Colin Hirsch and Daniel Frey | ||
2 | // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ | ||
3 | |||
4 | #ifndef TAOCPP_PEGTL_INCLUDE_INTERNAL_BUMP_UTIL_HPP | ||
5 | #define TAOCPP_PEGTL_INCLUDE_INTERNAL_BUMP_UTIL_HPP | ||
6 | |||
7 | #include <cstddef> | ||
8 | #include <type_traits> | ||
9 | |||
10 | #include "../config.hpp" | ||
11 | |||
12 | #include "result_on_found.hpp" | ||
13 | |||
14 | namespace tao | ||
15 | { | ||
16 | namespace TAOCPP_PEGTL_NAMESPACE | ||
17 | { | ||
18 | namespace internal | ||
19 | { | ||
20 | template< bool > | ||
21 | struct bump_impl; | ||
22 | |||
23 | template<> | ||
24 | struct bump_impl< true > | ||
25 | { | ||
26 | template< typename Input > | ||
27 | static void bump( Input& in, const std::size_t count ) noexcept | ||
28 | { | ||
29 | in.bump( count ); | ||
30 | } | ||
31 | }; | ||
32 | |||
33 | template<> | ||
34 | struct bump_impl< false > | ||
35 | { | ||
36 | template< typename Input > | ||
37 | static void bump( Input& in, const std::size_t count ) noexcept | ||
38 | { | ||
39 | in.bump_in_this_line( count ); | ||
40 | } | ||
41 | }; | ||
42 | |||
43 | template< bool... > | ||
44 | struct bool_list | ||
45 | { | ||
46 | }; | ||
47 | |||
48 | template< bool... Bs > | ||
49 | using bool_and = std::is_same< bool_list< Bs..., true >, bool_list< true, Bs... > >; | ||
50 | |||
51 | template< result_on_found R, typename Input, typename Char, Char... Cs > | ||
52 | void bump_help( Input& in, const std::size_t count ) noexcept | ||
53 | { | ||
54 | using eol_t = typename Input::eol_t; | ||
55 | bump_impl< bool_and< ( Cs != eol_t::ch )... >::value != bool( R ) >::bump( in, count ); | ||
56 | } | ||
57 | |||
58 | } // namespace internal | ||
59 | |||
60 | } // namespace TAOCPP_PEGTL_NAMESPACE | ||
61 | |||
62 | } // namespace tao | ||
63 | |||
64 | #endif | ||