100.00% Lines (15/15) 100.00% Functions (5/5)
TLA Baseline Branch
Line Hits Code Line Hits Code
1   // 1   //
2   // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com) 2   // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3   // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com) 3   // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4   // 4   //
5   // Distributed under the Boost Software License, Version 1.0. (See accompanying 5   // Distributed under the Boost Software License, Version 1.0. (See accompanying
6   // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6   // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7   // 7   //
8   // Official repository: https://github.com/boostorg/url 8   // Official repository: https://github.com/boostorg/url
9   // 9   //
10   10  
11   #ifndef BOOST_URL_IMPL_PARSE_HPP 11   #ifndef BOOST_URL_IMPL_PARSE_HPP
12   #define BOOST_URL_IMPL_PARSE_HPP 12   #define BOOST_URL_IMPL_PARSE_HPP
13   13  
14   #include <boost/url/detail/config.hpp> 14   #include <boost/url/detail/config.hpp>
15   #include <boost/url/rfc/absolute_uri_rule.hpp> 15   #include <boost/url/rfc/absolute_uri_rule.hpp>
16   #include <boost/url/rfc/relative_ref_rule.hpp> 16   #include <boost/url/rfc/relative_ref_rule.hpp>
17   #include <boost/url/rfc/uri_rule.hpp> 17   #include <boost/url/rfc/uri_rule.hpp>
18   #include <boost/url/rfc/uri_reference_rule.hpp> 18   #include <boost/url/rfc/uri_reference_rule.hpp>
19   #include <boost/url/rfc/origin_form_rule.hpp> 19   #include <boost/url/rfc/origin_form_rule.hpp>
20   20  
21   namespace boost { 21   namespace boost {
22   namespace urls { 22   namespace urls {
23   23  
24   //------------------------------------------------ 24   //------------------------------------------------
25   // 25   //
26   // parse functions 26   // parse functions
27   // 27   //
28   //------------------------------------------------ 28   //------------------------------------------------
29   29  
30   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE 30   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
31   system::result<url_view> 31   system::result<url_view>
HITCBC 32   3 parse_absolute_uri( 32   3 parse_absolute_uri(
33   core::string_view s) 33   core::string_view s)
34   { 34   {
HITCBC 35   3 return grammar::parse( 35   3 return grammar::parse(
HITCBC 36   3 s, absolute_uri_rule); 36   3 s, absolute_uri_rule);
37   } 37   }
38   38  
39   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE 39   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
40   system::result<url_view> 40   system::result<url_view>
HITCBC 41   3048 parse_origin_form( 41   3048 parse_origin_form(
42   core::string_view s) 42   core::string_view s)
43   { 43   {
HITCBC 44   3048 return grammar::parse( 44   3048 return grammar::parse(
HITCBC 45   3048 s, origin_form_rule); 45   3048 s, origin_form_rule);
46   } 46   }
47   47  
48   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE 48   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
49   system::result<url_view> 49   system::result<url_view>
HITCBC 50   3191 parse_relative_ref( 50   3191 parse_relative_ref(
51   core::string_view s) 51   core::string_view s)
52   { 52   {
HITCBC 53   3191 return grammar::parse( 53   3191 return grammar::parse(
HITCBC 54   3191 s, relative_ref_rule); 54   3191 s, relative_ref_rule);
55   } 55   }
56   56  
57   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE 57   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
58   system::result<url_view> 58   system::result<url_view>
HITCBC 59   7271 parse_uri( 59   7271 parse_uri(
60   core::string_view s) 60   core::string_view s)
61   { 61   {
HITCBC 62   7271 return grammar::parse( 62   7271 return grammar::parse(
HITCBC 63   7271 s, uri_rule); 63   7271 s, uri_rule);
64   } 64   }
65   65  
66   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE 66   BOOST_URL_CXX20_CONSTEXPR_OR_INLINE
67   system::result<url_view> 67   system::result<url_view>
HITCBC 68   12772 parse_uri_reference( 68   12776 parse_uri_reference(
69   core::string_view s) 69   core::string_view s)
70   { 70   {
HITCBC 71   12772 return grammar::parse( 71   12776 return grammar::parse(
HITCBC 72   12772 s, uri_reference_rule); 72   12776 s, uri_reference_rule);
73   } 73   }
74   74  
75   } // urls 75   } // urls
76   } // boost 76   } // boost
77   77  
78   #endif 78   #endif