MCPcopy Create free account
hub / github.com/RenderKit/embree / parse

Method parse

tutorials/external/catch.hpp:7452–7470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7450 using ParserRefImpl::ParserRefImpl;
7451
7452 auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override {
7453 auto validationResult = validate();
7454 if( !validationResult )
7455 return InternalParseResult( validationResult );
7456
7457 auto remainingTokens = tokens;
7458 auto const &token = *remainingTokens;
7459 if( token.type != TokenType::Argument )
7460 return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) );
7461
7462 assert( !m_ref->isFlag() );
7463 auto valueRef = static_cast<detail::BoundValueRefBase*>( m_ref.get() );
7464
7465 auto result = valueRef->setValue( remainingTokens->token );
7466 if( !result )
7467 return InternalParseResult( result );
7468 else
7469 return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) );
7470 }
7471 };
7472
7473 inline auto normaliseOpt( std::string const &optName ) -> std::string {

Callers 4

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

Calls 5

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

Tested by

no test coverage detected