(input, pos, f, s, t)
| 423 | * @returns {boolean} true, if the three code points start an ident sequence |
| 424 | */ |
| 425 | const _ifThreeCodePointsWouldStartAnIdentSequence = (input, pos, f, s, t) => { |
| 426 | const first = f || input.charCodeAt(pos - 1); |
| 427 | const second = s || input.charCodeAt(pos); |
| 428 | const third = t || input.charCodeAt(pos + 1); |
| 429 | if (first === CC_HYPHEN_MINUS) { |
| 430 | return ( |
| 431 | _isIdentStartCodePointCC(second) || |
| 432 | second === CC_HYPHEN_MINUS || |
| 433 | _ifTwoCodePointsAreValidEscape(input, pos, second, third) |
| 434 | ); |
| 435 | } |
| 436 | if (_isIdentStartCodePointCC(first)) return true; |
| 437 | if (first === CC_REVERSE_SOLIDUS) { |
| 438 | return _ifTwoCodePointsAreValidEscape(input, pos, first, second); |
| 439 | } |
| 440 | return false; |
| 441 | }; |
| 442 | |
| 443 | /** |
| 444 | * Spec: "three code points would start a number". |
no test coverage detected