Ada 2.7.8
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
32template <typename result_type = ada::url_aggregator>
33result_type parse_url(std::string_view user_input,
34 const result_type* base_url = nullptr);
35
37 std::string_view user_input, const url_aggregator* base_url);
38extern template url parse_url<url>(std::string_view user_input,
39 const url* base_url);
40
41} // namespace ada::parser
42
43#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:15
template url_aggregator parse_url< url_aggregator >(std::string_view user_input, const url_aggregator *base_url)
Definition ada_idna.h:13
ada_warn_unused ada::result< result_type > parse(std::string_view input, const result_type *base_url=nullptr)
Definitions for the states of the URL state machine.
Lightweight URL struct.
Generic URL struct reliant on std::string instantiation.
Definition url.h:38