()
| 11397 | return value; |
| 11398 | } |
| 11399 | function checkBigIntSuffix() { |
| 11400 | if (text.charCodeAt(pos) === 110 /* CharacterCodes.n */) { |
| 11401 | tokenValue += "n"; |
| 11402 | // Use base 10 instead of base 2 or base 8 for shorter literals |
| 11403 | if (tokenFlags & 384 /* TokenFlags.BinaryOrOctalSpecifier */) { |
| 11404 | tokenValue = ts.parsePseudoBigInt(tokenValue) + "n"; |
| 11405 | } |
| 11406 | pos++; |
| 11407 | return 9 /* SyntaxKind.BigIntLiteral */; |
| 11408 | } |
| 11409 | else { // not a bigint, so can convert to number in simplified form |
| 11410 | // Number() may not support 0b or 0o, so use parseInt() instead |
| 11411 | var numericValue = tokenFlags & 128 /* TokenFlags.BinarySpecifier */ |
| 11412 | ? parseInt(tokenValue.slice(2), 2) // skip "0b" |
| 11413 | : tokenFlags & 256 /* TokenFlags.OctalSpecifier */ |
| 11414 | ? parseInt(tokenValue.slice(2), 8) // skip "0o" |
| 11415 | : +tokenValue; |
| 11416 | tokenValue = "" + numericValue; |
| 11417 | return 8 /* SyntaxKind.NumericLiteral */; |
| 11418 | } |
| 11419 | } |
| 11420 | function scan() { |
| 11421 | var _a; |
| 11422 | startPos = pos; |
no test coverage detected
searching dependent graphs…