File indexing completed on 2025-01-31 10:02:35
0001
0002
0003
0004
0005
0006
0007 #if !defined(BOOST_SPIRIT_X3_OMIT_MARCH_24_2007_0802AM)
0008 #define BOOST_SPIRIT_X3_OMIT_MARCH_24_2007_0802AM
0009
0010 #include <boost/spirit/home/x3/support/unused.hpp>
0011 #include <boost/spirit/home/x3/core/parser.hpp>
0012
0013 namespace boost { namespace spirit { namespace x3
0014 {
0015
0016
0017
0018
0019 template <typename Subject>
0020 struct omit_directive : unary_parser<Subject, omit_directive<Subject>>
0021 {
0022 typedef unary_parser<Subject, omit_directive<Subject> > base_type;
0023 typedef unused_type attribute_type;
0024 static bool const has_attribute = false;
0025
0026 typedef Subject subject_type;
0027 constexpr omit_directive(Subject const& subject)
0028 : base_type(subject) {}
0029
0030 template <typename Iterator, typename Context, typename RContext>
0031 bool parse(Iterator& first, Iterator const& last
0032 , Context const& context, RContext& rcontext, unused_type) const
0033 {
0034 return this->subject.parse(first, last, context, rcontext, unused);
0035 }
0036 };
0037
0038 struct omit_gen
0039 {
0040 template <typename Subject>
0041 constexpr omit_directive<typename extension::as_parser<Subject>::value_type>
0042 operator[](Subject const& subject) const
0043 {
0044 return { as_parser(subject) };
0045 }
0046 };
0047
0048 constexpr auto omit = omit_gen{};
0049 }}}
0050
0051 #endif