4 #ifndef LEXY_DSL_UNTIL_HPP_INCLUDED
5 #define LEXY_DSL_UNTIL_HPP_INCLUDED
15 template <
typename Condition,
typename Reader>
18 if constexpr (std::is_same_v<Condition, _nl>
19 && lexy::_detail::is_swar_reader<Reader>)
27 auto cur = reader.peek_swar();
29 || lexy::_detail::swar_has_char_less<char_type, 0xF>(cur))
36 template <
typename Condition>
39 template <
typename Reader>
42 typename Reader::marker
end;
44 constexpr
explicit tp(
const Reader& reader) :
end(reader.current()) {}
50 _until_swar<Condition>(reader);
67 end = reader.current();
73 template <
typename Condition>
76 template <
typename Reader>
79 typename Reader::marker
end;
81 constexpr
explicit tp(
const Reader& reader) :
end(reader.current()) {}
87 _until_swar<Condition>(reader);
93 end = reader.current();
103 end = reader.current();
114 template <
typename Context>
122 "forgot to set end in try_parse()");
125 auto result = parser.try_parse(reader);
126 LEXY_ASSERT(!result,
"condition shouldn't have matched?!");
127 parser.report_error(context, reader);
140 template <
typename Condition>
143 static_assert(lexy::is_token_rule<Condition>);
150 template <
typename Condition>
152 template <
typename Condition>
156 #endif // LEXY_DSL_UNTIL_HPP_INCLUDED