Add support for multiply calling lambda parsers in Clara

Previously a lambda parser in Clara could only be invoked once,
even if it internally was ok with being invoked multiple times.

With this change, a lambda parser can mark itself as `accept_many`,
in which case it will be invoked multiple times if the appropriate
flag was supplied multiple times by the user.
This commit is contained in:
Martin Hořeňovský
2021-10-27 18:57:56 +02:00
parent f17725a186
commit 12d14a3c63
11 changed files with 292 additions and 20 deletions

View File

@@ -1426,6 +1426,6 @@ due to unexpected exception with message:
Why would you throw a std::string?
===============================================================================
test cases: 374 | 297 passed | 70 failed | 7 failed as expected
assertions: 2127 | 1971 passed | 129 failed | 27 failed as expected
test cases: 376 | 299 passed | 70 failed | 7 failed as expected
assertions: 2142 | 1986 passed | 129 failed | 27 failed as expected