Ada 2.8.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 "ada/state.h"
9#include "ada/encoding_type.h"
10#include "ada/expected.h"
11
12#include <optional>
13#include <string_view>
14
18namespace ada {
19struct url_aggregator;
20struct url;
21} // namespace ada
22
27namespace ada::parser {
28
35template <typename result_type = ada::url_aggregator>
36result_type parse_url(std::string_view user_input,
37 const result_type* base_url = nullptr);
38
40 std::string_view user_input, const url_aggregator* base_url);
41extern template url parse_url<url>(std::string_view user_input,
42 const url* base_url);
43
44} // namespace ada::parser
45
46#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:14
template url_aggregator parse_url< url_aggregator >(std::string_view user_input, const url_aggregator *base_url)
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