File indexing completed on 2025-01-18 09:53:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_URL_IMPL_GRAMMAR_TOKEN_RULE_HPP
0011 #define BOOST_URL_IMPL_GRAMMAR_TOKEN_RULE_HPP
0012
0013 #include <boost/url/grammar/error.hpp>
0014
0015 namespace boost {
0016 namespace urls {
0017 namespace grammar {
0018
0019 template<class CharSet>
0020 auto
0021 token_rule_t<CharSet>::
0022 parse(
0023 char const*& it,
0024 char const* end
0025 ) const noexcept ->
0026 system::result<value_type>
0027 {
0028 auto const it0 = it;
0029 if(it == end)
0030 {
0031 BOOST_URL_RETURN_EC(
0032 error::need_more);
0033 }
0034 it = (find_if_not)(it, end, cs_);
0035 if(it != it0)
0036 return core::string_view(it0, it - it0);
0037 BOOST_URL_RETURN_EC(
0038 error::mismatch);
0039 }
0040
0041 }
0042 }
0043 }
0044
0045 #endif