MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / parse

Method parse

Bcore/src/main/cpp/Dobby/tests/catch.hpp:5924–5942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5922 using ParserRefImpl::ParserRefImpl;
5923
5924 auto parse(std::string const &, TokenStream const &tokens) const -> InternalParseResult override {
5925 auto validationResult = validate();
5926 if (!validationResult)
5927 return InternalParseResult(validationResult);
5928
5929 auto remainingTokens = tokens;
5930 auto const &token = *remainingTokens;
5931 if (token.type != TokenType::Argument)
5932 return InternalParseResult::ok(ParseState(ParseResultType::NoMatch, remainingTokens));
5933
5934 assert(!m_ref->isFlag());
5935 auto valueRef = static_cast<detail::BoundValueRefBase *>(m_ref.get());
5936
5937 auto result = valueRef->setValue(remainingTokens->token);
5938 if (!result)
5939 return InternalParseResult(result);
5940 else
5941 return InternalParseResult::ok(ParseState(ParseResultType::Matched, ++remainingTokens));
5942 }
5943};
5944
5945inline auto normaliseOpt(std::string const &optName) -> std::string {

Callers 10

dumpDexMethod · 0.45
initViewModelMethod · 0.45
onOptionsItemSelectedMethod · 0.45
parseMethod · 0.45
ConfigMethod · 0.45
applyCommandLineMethod · 0.45
parseTestSpecFunction · 0.45
callMethod · 0.45
initMethod · 0.45

Calls 4

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

Tested by

no test coverage detected