diff options
Diffstat (limited to 'MoonParser/pegtl/internal/eolf.hpp')
-rw-r--r-- | MoonParser/pegtl/internal/eolf.hpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/MoonParser/pegtl/internal/eolf.hpp b/MoonParser/pegtl/internal/eolf.hpp new file mode 100644 index 0000000..168311c --- /dev/null +++ b/MoonParser/pegtl/internal/eolf.hpp | |||
@@ -0,0 +1,43 @@ | |||
1 | // Copyright (c) 2014-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_EOLF_HPP | ||
5 | #define TAOCPP_PEGTL_INCLUDE_INTERNAL_EOLF_HPP | ||
6 | |||
7 | #include "../config.hpp" | ||
8 | |||
9 | #include "skip_control.hpp" | ||
10 | |||
11 | #include "../analysis/generic.hpp" | ||
12 | |||
13 | namespace tao | ||
14 | { | ||
15 | namespace TAOCPP_PEGTL_NAMESPACE | ||
16 | { | ||
17 | namespace internal | ||
18 | { | ||
19 | struct eolf | ||
20 | { | ||
21 | using analyze_t = analysis::generic< analysis::rule_type::OPT >; | ||
22 | |||
23 | template< typename Input > | ||
24 | static bool match( Input& in ) | ||
25 | { | ||
26 | using eol_t = typename Input::eol_t; | ||
27 | const auto p = eol_t::match( in ); | ||
28 | return p.first || ( !p.second ); | ||
29 | } | ||
30 | }; | ||
31 | |||
32 | template<> | ||
33 | struct skip_control< eolf > : std::true_type | ||
34 | { | ||
35 | }; | ||
36 | |||
37 | } // namespace internal | ||
38 | |||
39 | } // namespace TAOCPP_PEGTL_NAMESPACE | ||
40 | |||
41 | } // namespace tao | ||
42 | |||
43 | #endif | ||