mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Fixed issue with different result types in Clara
This commit is contained in:
parent
c41a45e79c
commit
e62b3beef4
8
include/external/clara.hpp
vendored
8
include/external/clara.hpp
vendored
@ -870,16 +870,16 @@ namespace detail {
|
||||
using ParserRefImpl::ParserRefImpl;
|
||||
|
||||
auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {
|
||||
auto result = validate();
|
||||
if (!result)
|
||||
return InternalParseResult(result);
|
||||
auto validationResult = validate();
|
||||
if (!validationResult)
|
||||
return InternalParseResult(validationResult);
|
||||
|
||||
auto remainingTokens = tokens;
|
||||
auto const &token = *remainingTokens;
|
||||
if (token.type != TokenType::Argument)
|
||||
return InternalParseResult::ok(ParseState(ParseResultType::NoMatch, remainingTokens));
|
||||
|
||||
result = m_ref->setValue(remainingTokens->token);
|
||||
auto result = m_ref->setValue(remainingTokens->token);
|
||||
if (!result)
|
||||
return InternalParseResult(result);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user