/////////////////////////////////////////////////////////////////////////// Lexer::Type::hex 0xX+
| 480 | // Lexer::Type::hex |
| 481 | // 0xX+ |
| 482 | bool Lexer::isHexNumber(std::string& token, Lexer::Type& type) { |
| 483 | std::size_t marker = _cursor; |
| 484 | |
| 485 | if (_eos - marker >= 3 && _text[marker + 0] == '0' && _text[marker + 1] == 'x') { |
| 486 | marker += 2; |
| 487 | |
| 488 | while (unicodeHexDigit(_text[marker])) ++marker; |
| 489 | |
| 490 | if (marker - _cursor > 2) { |
| 491 | token = _text.substr(_cursor, marker - _cursor); |
| 492 | type = Lexer::Type::hex; |
| 493 | _cursor = marker; |
| 494 | return true; |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | return false; |
| 499 | } |
| 500 | |
| 501 | //////////////////////////////////////////////////////////////////////////////// |
| 502 | // Lexer::Type::number |
nothing calls this directly
no outgoing calls
no test coverage detected