Go to the documentation of this file.
4 #ifndef LEXY_DSL_MEMBER_HPP_INCLUDED
5 #define LEXY_DSL_MEMBER_HPP_INCLUDED
16 template <
typename Object,
typename Value>
17 constexpr
void operator()(Object&
object, Value&& value)
const
23 template <
typename Fn>
33 template <
typename Fn,
typename Rule>
36 template <
typename Reader>
41 template <
typename ControlBlock>
42 constexpr
auto try_parse(
const ControlBlock* cb,
const Reader& reader)
44 return rule.try_parse(cb, reader);
47 template <
typename Context>
48 constexpr
void cancel(Context& context)
53 template <
typename NextParser,
typename Context,
typename... Args>
57 return rule.template finish<NextParser>(context, reader,
LEXY_FWD(args)...,
62 template <
typename NextParser>
65 template <
typename Context,
typename Reader,
typename... Args>
75 template <
typename Fn>
80 template <
typename Rule>
83 using lambda = std::conditional_t<std::is_default_constructible_v<Fn>, Fn,
91 template <auto MemPtr>
94 #define LEXY_MEM(Name) \
95 ::lexyd::_mem_dsl([](auto& obj, auto&& value) { obj.Name = LEXY_FWD(value); })
98 #endif // LEXY_DSL_MEMBER_HPP_INCLUDED
constexpr _mem_dsl(Fn={})
constexpr auto try_parse(const ControlBlock *cb, const Reader &reader)
constexpr void operator()(Object &object, Value &&value) const
typename BranchRule::template bp< Reader > branch_parser_for
constexpr auto operator=(Rule) const
lexy::branch_parser_for< Rule, Reader > rule
constexpr auto parse(const Input &input, const ErrorCallback &callback)
Parses the production into a value, invoking the callback on error.
static LEXY_PARSER_FUNC bool parse(Context &context, Reader &reader, Args &&... args)
typename Rule::template p< NextParser > parser_for
LEXY_PARSER_FUNC auto finish(Context &context, Reader &reader, Args &&... args)
decltype(_copy_base_impl< Rule >()) _copy_base
constexpr void cancel(Context &context)