| 640 | } |
| 641 | |
| 642 | void Reader::readNumber() { |
| 643 | const char *p = current_; |
| 644 | char c = '0'; // stopgap for already consumed character |
| 645 | // integral part |
| 646 | while (c >= '0' && c <= '9') |
| 647 | c = (current_ = p) < end_ ? *p++ : '\0'; |
| 648 | // fractional part |
| 649 | if (c == '.') { |
| 650 | c = (current_ = p) < end_ ? *p++ : '\0'; |
| 651 | while (c >= '0' && c <= '9') |
| 652 | c = (current_ = p) < end_ ? *p++ : '\0'; |
| 653 | } |
| 654 | // exponential part |
| 655 | if (c == 'e' || c == 'E') { |
| 656 | c = (current_ = p) < end_ ? *p++ : '\0'; |
| 657 | if (c == '+' || c == '-') |
| 658 | c = (current_ = p) < end_ ? *p++ : '\0'; |
| 659 | while (c >= '0' && c <= '9') |
| 660 | c = (current_ = p) < end_ ? *p++ : '\0'; |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | bool Reader::readString() { |
| 665 | Char c = '\0'; |
nothing calls this directly
no outgoing calls
no test coverage detected