Closed rkaminsk closed 1 year ago
The following production fails to compile:
struct bracketed { static constexpr auto rule = []() { return dsl::curly_bracketed.opt(dsl::identifier(dsl::ascii::lower)); }(); static constexpr auto value = lexy::callback<std::string>( //[]() { // return "empty"; //}, [](lexy::nullopt) { return "null"; }, [](lexeme name) { return lexy::as_string<std::string>(name); } ); };
The error is
error: static assertion failed due to requirement '_detail::error<bracketed>': missing value callback overload for production
The error disappears adding the uncommented overload.
That isn't a bug. The empty callback is invoked during error recovery of an input like {NOTLOWERCASE}. I'll add a note to the docs.
{NOTLOWERCASE}
I see. Thanks.
The following production fails to compile:
The error is
The error disappears adding the uncommented overload.