Go to the documentation of this file.
4 #ifndef LEXY_DSL_NEWLINE_HPP_INCLUDED
5 #define LEXY_DSL_NEWLINE_HPP_INCLUDED
17 return "expected newline";
25 :
LEXY_DECAY_DECLTYPE(literal_set(LEXY_LIT("\n"), LEXY_LIT("\r\n")).error<lexy::expected_newline>)
36 template <
typename Reader>
39 static_assert(lexy::is_char_encoding<typename Reader::encoding>);
41 constexpr
bool try_parse(
const void*, Reader reader)
47 template <
typename Context>
51 template <
typename NextParser,
typename Context,
typename... Args>
56 auto pos = reader.position();
69 template <
typename NextParser>
72 template <
typename Context,
typename Reader,
typename... Args>
75 static_assert(lexy::is_char_encoding<typename Reader::encoding>);
85 #endif // LEXY_DSL_NEWLINE_HPP_INCLUDED
constexpr bool try_parse(const void *, Reader reader)
constexpr auto eol
Matches the end of line (EOF or newline).
constexpr auto parse(const Input &input, const ErrorCallback &callback)
Parses the production into a value, invoking the callback on error.
constexpr void cancel(Context &)
constexpr LEXY_FORCE_INLINE auto try_match_token(TokenRule, Reader &reader)
#define LEXY_DECAY_DECLTYPE(...)
static LEXY_PARSER_FUNC bool parse(Context &context, Reader &reader, Args &&... args)
constexpr auto newline
Matches a newline character.
LEXY_PARSER_FUNC bool finish(Context &context, Reader &reader, Args &&... args)
static LEXY_CONSTEVAL auto name()
constexpr auto eof
Matches EOF.