aboutsummaryrefslogtreecommitdiff
path: root/MoonParser/pegtl/internal/iterator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'MoonParser/pegtl/internal/iterator.hpp')
-rw-r--r--MoonParser/pegtl/internal/iterator.hpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/MoonParser/pegtl/internal/iterator.hpp b/MoonParser/pegtl/internal/iterator.hpp
new file mode 100644
index 0000000..4179738
--- /dev/null
+++ b/MoonParser/pegtl/internal/iterator.hpp
@@ -0,0 +1,53 @@
1// Copyright (c) 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_ITERATOR_HPP
5#define TAOCPP_PEGTL_INCLUDE_INTERNAL_ITERATOR_HPP
6
7#include <cstdlib>
8
9#include "../config.hpp"
10
11namespace tao
12{
13 namespace TAOCPP_PEGTL_NAMESPACE
14 {
15 namespace internal
16 {
17 struct iterator
18 {
19 iterator() noexcept = default;
20
21 explicit iterator( const char* in_data ) noexcept
22 : data( in_data ),
23 byte( 0 ),
24 line( 1 ),
25 byte_in_line( 0 )
26 {
27 }
28
29 iterator( const char* in_data, const std::size_t in_byte, const std::size_t in_line, const std::size_t in_byte_in_line ) noexcept
30 : data( in_data ),
31 byte( in_byte ),
32 line( in_line ),
33 byte_in_line( in_byte_in_line )
34 {
35 }
36
37 iterator( const iterator& ) = default;
38 iterator& operator=( const iterator& ) = default;
39
40 const char* data;
41
42 std::size_t byte;
43 std::size_t line;
44 std::size_t byte_in_line;
45 };
46
47 } // namespace internal
48
49 } // namespace TAOCPP_PEGTL_NAMESPACE
50
51} // namespace tao
52
53#endif