mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23: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;
|
using ParserRefImpl::ParserRefImpl;
|
||||||
|
|
||||||
auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {
|
auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override {
|
||||||
auto result = validate();
|
auto validationResult = validate();
|
||||||
if (!result)
|
if (!validationResult)
|
||||||
return InternalParseResult(result);
|
return InternalParseResult(validationResult);
|
||||||
|
|
||||||
auto remainingTokens = tokens;
|
auto remainingTokens = tokens;
|
||||||
auto const &token = *remainingTokens;
|
auto const &token = *remainingTokens;
|
||||||
if (token.type != TokenType::Argument)
|
if (token.type != TokenType::Argument)
|
||||||
return InternalParseResult::ok(ParseState(ParseResultType::NoMatch, remainingTokens));
|
return InternalParseResult::ok(ParseState(ParseResultType::NoMatch, remainingTokens));
|
||||||
|
|
||||||
result = m_ref->setValue(remainingTokens->token);
|
auto result = m_ref->setValue(remainingTokens->token);
|
||||||
if (!result)
|
if (!result)
|
||||||
return InternalParseResult(result);
|
return InternalParseResult(result);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user