MCPcopy Create free account
hub / github.com/argotorg/solidity / expect

Method expect

test/libsolidity/util/TestFileParser.cpp:244–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244bool TestFileParser::expect(Token _token, bool const _advance)
245{
246 if (m_scanner.currentToken() != _token || m_scanner.currentToken() == Token::Invalid)
247 BOOST_THROW_EXCEPTION(TestParserError(
248 "Unexpected " + formatToken(m_scanner.currentToken()) + ": \"" +
249 m_scanner.currentLiteral() + "\". " +
250 "Expected \"" + formatToken(_token) + "\"."
251 )
252 );
253 if (_advance)
254 m_scanner.scanNextToken();
255 return true;
256}
257
258std::pair<std::string, bool> TestFileParser::parseFunctionSignature()
259{

Callers

nothing calls this directly

Calls 5

TestParserErrorClass · 0.85
formatTokenFunction · 0.85
scanNextTokenMethod · 0.80
currentTokenMethod · 0.45
currentLiteralMethod · 0.45

Tested by

no test coverage detected