Ada 2.9.0
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
parser.h
Go to the documentation of this file.
1
5#ifndef ADA_PARSER_H
6#define ADA_PARSER_H
7
8#include <optional>
9#include <string_view>
10
11#include "ada/encoding_type.h"
12#include "ada/expected.h"
13#include "ada/state.h"
14
18namespace ada {
19struct url_aggregator;
20struct url;
21} // namespace ada
22
27namespace ada::parser {
34template <typename result_type = ada::url_aggregator>
35result_type parse_url(std::string_view user_input,
36 const result_type* base_url = nullptr);
37
39 std::string_view user_input, const url_aggregator* base_url);
40extern template url parse_url<url>(std::string_view user_input,
41 const url* base_url);
42
43template <typename result_type = ada::url_aggregator, bool store_values = true>
44result_type parse_url_impl(std::string_view user_input,
45 const result_type* base_url = nullptr);
46
48 std::string_view user_input, const url_aggregator* base_url);
49extern template url parse_url_impl<url>(std::string_view user_input,
50 const url* base_url);
51} // namespace ada::parser
52
53#endif // ADA_PARSER_H
Definition for supported encoding types.
Includes the definitions for supported parsers.
template url parse_url< url >(std::string_view user_input, const url *base_url)
result_type parse_url(std::string_view user_input, const result_type *base_url=nullptr)
Definition parser.cpp:928
template url parse_url_impl< url >(std::string_view user_input, const url *base_url)
template url_aggregator parse_url_impl< url_aggregator >(std::string_view user_input, const url_aggregator *base_url)
template url_aggregator parse_url< url_aggregator >(std::string_view user_input, const url_aggregator *base_url)
result_type parse_url_impl(std::string_view user_input, const result_type *base_url=nullptr)
Definition parser.cpp:15
Definition ada_idna.h:13
Definitions for the states of the URL state machine.
Lightweight URL struct.
Generic URL struct reliant on std::string instantiation.
Definition url.h:38