| 172 | } |
| 173 | |
| 174 | void StringConsumer::SkipIntegerBase(int base) |
| 175 | { |
| 176 | this->SkipIf("-"); |
| 177 | if (base == 0) { |
| 178 | if (this->ReadIf("0x") || this->ReadIf("0X")) { // boolean short-circuit ensures only one prefix is read |
| 179 | base = 16; |
| 180 | } else { |
| 181 | base = 10; |
| 182 | } |
| 183 | } |
| 184 | switch (base) { |
| 185 | default: |
| 186 | assert(false); |
| 187 | break; |
| 188 | case 8: |
| 189 | this->SkipUntilCharNotIn("01234567"); |
| 190 | break; |
| 191 | case 10: |
| 192 | this->SkipUntilCharNotIn("0123456789"); |
| 193 | break; |
| 194 | case 16: |
| 195 | this->SkipUntilCharNotIn("0123456789abcdefABCDEF"); |
| 196 | break; |
| 197 | } |
| 198 | } |
no test coverage detected