Line | Branch | Exec | Source |
---|---|---|---|
1 | // | ||
2 | // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) | ||
3 | // | ||
4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
6 | // | ||
7 | // Official repository: https://github.com/boostorg/url | ||
8 | // | ||
9 | |||
10 | #ifndef BOOST_URL_GRAMMAR_IMPL_DELIM_RULE_IPP | ||
11 | #define BOOST_URL_GRAMMAR_IMPL_DELIM_RULE_IPP | ||
12 | |||
13 | #include <boost/url/detail/config.hpp> | ||
14 | #include <boost/url/detail/config.hpp> | ||
15 | #include <boost/url/grammar/delim_rule.hpp> | ||
16 | |||
17 | namespace boost { | ||
18 | namespace urls { | ||
19 | namespace grammar { | ||
20 | |||
21 | auto | ||
22 | 8181 | ch_delim_rule:: | |
23 | parse( | ||
24 | char const*& it, | ||
25 | char const* end) const noexcept -> | ||
26 | system::result<value_type> | ||
27 | { | ||
28 |
2/2✓ Branch 0 taken 1100 times.
✓ Branch 1 taken 7081 times.
|
8181 | if(it == end) |
29 | { | ||
30 | // end | ||
31 | 1100 | BOOST_URL_RETURN_EC( | |
32 | error::need_more); | ||
33 | } | ||
34 |
2/2✓ Branch 0 taken 2366 times.
✓ Branch 1 taken 4715 times.
|
7081 | if(*it != ch_) |
35 | { | ||
36 | // wrong character | ||
37 | 2366 | BOOST_URL_RETURN_EC( | |
38 | error::mismatch); | ||
39 | } | ||
40 | 4715 | return core::string_view{ | |
41 | 4715 | it++, 1 }; | |
42 | }; | ||
43 | |||
44 | } // grammar | ||
45 | } // urls | ||
46 | } // boost | ||
47 | |||
48 | #endif | ||
49 |