/src/Fast-DDS/thirdparty/taocpp-pegtl/pegtl/internal/eof.hpp
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey |
2 | | // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ |
3 | | |
4 | | #ifndef TAO_PEGTL_INTERNAL_EOF_HPP |
5 | | #define TAO_PEGTL_INTERNAL_EOF_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 TAO_PEGTL_NAMESPACE |
16 | | { |
17 | | namespace internal |
18 | | { |
19 | | struct eof |
20 | | { |
21 | | using analyze_t = analysis::generic< analysis::rule_type::opt >; |
22 | | |
23 | | template< typename Input > |
24 | | static bool match( Input& in ) noexcept( noexcept( in.empty() ) ) |
25 | 0 | { |
26 | 0 | return in.empty(); |
27 | 0 | } |
28 | | }; |
29 | | |
30 | | template<> |
31 | | struct skip_control< eof > : std::true_type |
32 | | { |
33 | | }; |
34 | | |
35 | | } // namespace internal |
36 | | |
37 | | } // namespace TAO_PEGTL_NAMESPACE |
38 | | |
39 | | } // namespace tao |
40 | | |
41 | | #endif |