Skip to content
Discussion options

You must be logged in to vote

I think the issue is that opt_list produces lexy::nullopt when the list is not empty, not an empty sink: https://lexy.foonathan.net/reference/dsl/terminator/#_rule_opt_list So you need to add a constructor to FunctionCallExpressionSyntax that accepts std::nullopt, or change it to one that constructs a std::optional<std::vector<...>>.

FYI, the static assert "missing value callback for production" shows you the callback that is missing in the error message in the types of the _detail::error instantiation. For example: https://godbolt.org/z/6ojrMYWf5 fails with

opt/compiler-explorer/libs/lexy/trunk/include/lexy/grammar.hpp:371:27: error: static assertion failed due to requirement '_detail::e…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@natinusala
Comment options

@foonathan
Comment options

Answer selected by natinusala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants