()
| 1372 | } |
| 1373 | |
| 1374 | parseNumber() { |
| 1375 | const startPos = this.pos; |
| 1376 | |
| 1377 | if (this.content.charCodeAt(this.pos) === ZERO && |
| 1378 | this.pos + 1 < this.length && |
| 1379 | this.content.charCodeAt(this.pos + 1) === 120) { // 'x' |
| 1380 | // Hex number |
| 1381 | this.pos += 2; |
| 1382 | while (this.pos < this.length && this.isHexDigit(this.content.charCodeAt(this.pos))) { |
| 1383 | this.pos++; |
| 1384 | } |
| 1385 | } else { |
| 1386 | // Decimal number |
| 1387 | while (this.pos < this.length && this.isDigit(this.content.charCodeAt(this.pos))) { |
| 1388 | this.pos++; |
| 1389 | } |
| 1390 | } |
| 1391 | |
| 1392 | return this.content.slice(startPos, this.pos); |
| 1393 | } |
| 1394 | |
| 1395 | parseIdentifier() { |
| 1396 | const startPos = this.pos; |
no test coverage detected