GCC Code Coverage Report


Directory: libs/url/
File: libs/url/src/parse.cpp
Date: 2024-04-08 19:38:36
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
12 #include <boost/url/detail/config.hpp>
13 #include <boost/url/parse.hpp>
14 #include <boost/url/rfc/absolute_uri_rule.hpp>
15 #include <boost/url/rfc/relative_ref_rule.hpp>
16 #include <boost/url/rfc/uri_rule.hpp>
17 #include <boost/url/rfc/uri_reference_rule.hpp>
18 #include <boost/url/rfc/origin_form_rule.hpp>
19 #include <boost/url/grammar/parse.hpp>
20
21 namespace boost {
22 namespace urls {
23
24 system::result<url_view>
25 2 parse_absolute_uri(
26 core::string_view s)
27 {
28 return grammar::parse(
29 2 s, absolute_uri_rule);
30 }
31
32 system::result<url_view>
33 14 parse_origin_form(
34 core::string_view s)
35 {
36 return grammar::parse(
37 14 s, origin_form_rule);
38 }
39
40 system::result<url_view>
41 146 parse_relative_ref(
42 core::string_view s)
43 {
44 return grammar::parse(
45 146 s, relative_ref_rule);
46 }
47 system::result<url_view>
48 886 parse_uri(
49 core::string_view s)
50 {
51 return grammar::parse(
52 886 s, uri_rule);
53 }
54
55 system::result<url_view>
56 2489 parse_uri_reference(
57 core::string_view s)
58 {
59 return grammar::parse(
60 2489 s, uri_reference_rule);
61 }
62
63 } // urls
64 } // boost
65
66