MCPcopy Create free account
hub / github.com/Profactor/cv-plot / parse

Method parse

CvPlot/ext/catch2/inc/catch.hpp:9260–9278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9258 using ParserRefImpl::ParserRefImpl;
9259
9260 auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override {
9261 auto validationResult = validate();
9262 if( !validationResult )
9263 return InternalParseResult( validationResult );
9264
9265 auto remainingTokens = tokens;
9266 auto const &token = *remainingTokens;
9267 if( token.type != TokenType::Argument )
9268 return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );
9269
9270 assert( !m_ref->isFlag() );
9271 auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );
9272
9273 auto result = valueRef->setValue( remainingTokens->token );
9274 if( !result )
9275 return InternalParseResult( result );
9276 else
9277 return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );
9278 }
9279 };
9280
9281 inline auto normaliseOpt( std::string const &optName ) -> std::string {

Callers 4

parseMethod · 0.45
ConfigMethod · 0.45
applyCommandLineMethod · 0.45
parseTestSpecFunction · 0.45

Calls 4

ParseStateClass · 0.85
isFlagMethod · 0.45
getMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected