Go to the documentation of this file.
4 #ifndef LEXY_DSL_BRACKETS_HPP_INCLUDED
5 #define LEXY_DSL_BRACKETS_HPP_INCLUDED
13 template <
typename Open,
typename Close,
typename RecoveryLimit =
void>
17 template <
typename... Literals>
20 static_assert(
sizeof...(Literals) > 0);
23 return _brackets<Open, Close, decltype(l)>{};
36 constexpr
auto try_(R r)
const
44 constexpr
auto opt(R r)
const
52 constexpr
auto list(R r)
const
56 template <
typename R,
typename S>
69 template <
typename R,
typename S>
77 constexpr
auto open()
const
100 template <
typename Open,
typename Close>
113 constexpr auto parenthesized = round_bracketed;
116 #endif // LEXY_DSL_BRACKETS_HPP_INCLUDED
constexpr auto open() const
Matches the open bracket.
constexpr auto recovery_rule() const
constexpr auto sep(Branch)
Defines a separator for a list.
constexpr auto close() const
Matches the closing bracket.
constexpr auto opt(R r) const
constexpr auto try_(R r) const
Matches the rule surrounded by brackets, recovering on error.
constexpr auto round_bracketed
constexpr auto angle_bracketed
#define LEXY_REQUIRE_BRANCH_RULE(Rule, Name)
constexpr auto curly_bracketed
constexpr auto opt_list(R r, S sep) const
constexpr auto as_terminator() const
Returns an equivalent terminator.
constexpr auto limit(Literals... literals) const
Adds the literal tokens to the recovery limit.
constexpr auto brackets(Open, Close)
Defines open and close brackets.
constexpr auto list(R r, S sep) const
constexpr auto opt_list(R r) const
constexpr auto list(R r) const
constexpr auto operator()(R r) const
Matches the rule surrounded by brackets.
constexpr auto square_bracketed