* `#` — hash or delim. * @param {string} input input * @param {number} pos position just past `#` * @param {MutableToken} out token to populate * @returns {MutableToken | undefined} the resulting token, or undefined at EOF
(input, pos, out)
| 662 | * @returns {MutableToken | undefined} the resulting token, or undefined at EOF |
| 663 | */ |
| 664 | function consumeNumberSign(input, pos, out) { |
| 665 | const start = pos - 1; |
| 666 | const first = input.charCodeAt(pos); |
| 667 | const second = input.charCodeAt(pos + 1); |
| 668 | if ( |
| 669 | _isIdentCodePoint(first) || |
| 670 | _ifTwoCodePointsAreValidEscape(input, pos, first, second) |
| 671 | ) { |
| 672 | const third = input.charCodeAt(pos + 2); |
| 673 | out.isId = _ifThreeCodePointsWouldStartAnIdentSequence( |
| 674 | input, |
| 675 | pos, |
| 676 | first, |
| 677 | second, |
| 678 | third |
| 679 | ); |
| 680 | pos = _consumeAnIdentSequence(input, pos); |
| 681 | return fill(out, TT_HASH, start, pos); |
| 682 | } |
| 683 | return fill(out, TT_DELIM, start, pos); |
| 684 | } |
| 685 | |
| 686 | /** |
| 687 | * `-` — number / cdc / ident / delim. |
no test coverage detected