diff options
Diffstat (limited to 'MoonParser/pegtl/string_input.hpp')
-rw-r--r-- | MoonParser/pegtl/string_input.hpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/MoonParser/pegtl/string_input.hpp b/MoonParser/pegtl/string_input.hpp deleted file mode 100644 index a1c1f98..0000000 --- a/MoonParser/pegtl/string_input.hpp +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
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_STRING_INPUT_HPP | ||
5 | #define TAOCPP_PEGTL_INCLUDE_STRING_INPUT_HPP | ||
6 | |||
7 | #include <string> | ||
8 | #include <utility> | ||
9 | |||
10 | #include "config.hpp" | ||
11 | #include "eol.hpp" | ||
12 | #include "memory_input.hpp" | ||
13 | #include "tracking_mode.hpp" | ||
14 | |||
15 | namespace tao | ||
16 | { | ||
17 | namespace TAOCPP_PEGTL_NAMESPACE | ||
18 | { | ||
19 | namespace internal | ||
20 | { | ||
21 | struct string_holder | ||
22 | { | ||
23 | const std::string data; | ||
24 | |||
25 | template< typename T > | ||
26 | explicit string_holder( T&& in_data ) | ||
27 | : data( std::forward< T >( in_data ) ) | ||
28 | { | ||
29 | } | ||
30 | }; | ||
31 | |||
32 | } // namespace internal | ||
33 | |||
34 | template< tracking_mode P = tracking_mode::IMMEDIATE, typename Eol = eol::lf_crlf, typename Source = std::string > | ||
35 | struct string_input | ||
36 | : private internal::string_holder, | ||
37 | public memory_input< P, Eol, Source > | ||
38 | { | ||
39 | template< typename T, typename... Ts > | ||
40 | explicit string_input( T&& in_data, Ts&&... ts ) | ||
41 | : internal::string_holder( std::forward< T >( in_data ) ), | ||
42 | memory_input< P, Eol, Source >( data.data(), data.size(), std::forward< Ts >( ts )... ) | ||
43 | { | ||
44 | } | ||
45 | }; | ||
46 | |||
47 | } // namespace TAOCPP_PEGTL_NAMESPACE | ||
48 | |||
49 | } // namespace tao | ||
50 | |||
51 | #endif | ||