1 #ifndef BOOST_METAPARSE_V1_SOURCE_POSITION_TAG_HPP
2 #define BOOST_METAPARSE_V1_SOURCE_POSITION_TAG_HPP
4 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #include <boost/metaparse/v1/fwd/source_position.hpp>
10 #include <boost/metaparse/v1/fwd/get_prev_char.hpp>
11 #include <boost/metaparse/v1/fwd/next_line.hpp>
12 #include <boost/metaparse/v1/fwd/next_char.hpp>
13 #include <boost/metaparse/v1/get_col.hpp>
14 #include <boost/metaparse/v1/get_line.hpp>
17 #include <boost/mpl/int.hpp>
25 struct source_position_tag { typedef source_position_tag type; };
28 struct get_col_impl<source_position_tag>
31 struct apply : P::col {};
35 struct get_line_impl<source_position_tag>
38 struct apply : P::line {};
43 struct get_prev_char_impl<source_position_tag>
46 struct apply : P::prev_char {};
51 struct next_char_impl<source_position_tag>
53 template <class P, class Ch>
56 typename get_line<P>::type,
57 boost::mpl::int_<get_col<P>::type::value + 1>,
64 struct next_line_impl<source_position_tag>
66 template <class P, class Ch>
69 boost::mpl::int_<get_line<P>::type::value + 1>,