GCC Code Coverage Report


Directory: libs/url/
File: libs/url/src/parse.cpp
Date: 2024-01-19 15:42:54
Exec Total Coverage
Lines: 10 10 100.0%
Functions: 5 5 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 //
2 // Copyright (c) 2019 Vinnie Falco (vinnie.falco@gmail.com)
3 // Copyright (c) 2022 Alan de Freitas (alandefreitas@gmail.com)
4 //
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)
7 //
8 // Official repository: https://github.com/boostorg/url
9 //
10
11 #ifndef BOOST_URL_IMPL_PARSE_IPP
12 #define BOOST_URL_IMPL_PARSE_IPP
13
14 #include <boost/url/detail/config.hpp>
15 #include <boost/url/parse.hpp>
16 #include <boost/url/rfc/absolute_uri_rule.hpp>
17 #include <boost/url/rfc/relative_ref_rule.hpp>
18 #include <boost/url/rfc/uri_rule.hpp>
19 #include <boost/url/rfc/uri_reference_rule.hpp>
20 #include <boost/url/rfc/origin_form_rule.hpp>
21 #include <boost/url/grammar/parse.hpp>
22
23 namespace boost {
24 namespace urls {
25
26 system::result<url_view>
27 2 parse_absolute_uri(
28 core::string_view s)
29 {
30 return grammar::parse(
31 2 s, absolute_uri_rule);
32 }
33
34 system::result<url_view>
35 14 parse_origin_form(
36 core::string_view s)
37 {
38 return grammar::parse(
39 14 s, origin_form_rule);
40 }
41
42 system::result<url_view>
43 146 parse_relative_ref(
44 core::string_view s)
45 {
46 return grammar::parse(
47 146 s, relative_ref_rule);
48 }
49 system::result<url_view>
50 874 parse_uri(
51 core::string_view s)
52 {
53 return grammar::parse(
54 874 s, uri_rule);
55 }
56
57 system::result<url_view>
58 2484 parse_uri_reference(
59 core::string_view s)
60 {
61 return grammar::parse(
62 2484 s, uri_reference_rule);
63 }
64
65 } // urls
66 } // boost
67
68 #endif
69