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

Function parseUnsignedInteger

test/CommonSyntaxTest.cpp:50–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48{
49
50int parseUnsignedInteger(std::string::iterator& _it, std::string::iterator _end)
51{
52 if (_it == _end || !util::isDigit(*_it))
53 BOOST_THROW_EXCEPTION(std::runtime_error("Invalid test expectation. Source location expected."));
54 int result = 0;
55 while (_it != _end && util::isDigit(*_it))
56 {
57 result *= 10;
58 result += *_it - '0';
59 ++_it;
60 }
61 return result;
62}
63
64}
65

Callers 1

parseExpectationsMethod · 0.85

Calls 1

isDigitFunction · 0.85

Tested by

no test coverage detected