di 0.1.0
Loading...
Searching...
No Matches
parse_partial.h
Go to the documentation of this file.
1#pragma once
2
7
8namespace di::parser {
9namespace detail {
10 template<typename T>
11 struct ParsePartialFunction {
12 template<concepts::IntoParserContext U, typename Context = meta::AsParserContext<U>>
13 requires(concepts::Parsable<T, Context>)
14 constexpr auto operator()(U&& input) const {
15 auto context = into_parser_context(util::forward<U>(input));
16 auto parser = create_parser<T>(context);
17 return parser.parse(context);
18 }
19 };
20}
21
22template<typename T>
23constexpr inline auto parse_partial = detail::ParsePartialFunction<T> {};
24}
25
26namespace di {
28}
Definition code_point_parser.h:10
constexpr auto create_parser
Definition create_parser.h:55
constexpr auto parse_partial
Definition parse_partial.h:23
constexpr auto into_parser_context
Definition into_parser_context.h:21
Definition any_storable.h:9