()
| 740 | } |
| 741 | |
| 742 | private consumeNumericToken(): NumberValueToken | DimensionToken { |
| 743 | const [number, flags] = this.consumeNumber(); |
| 744 | const c1 = this.peekCodePoint(0); |
| 745 | const c2 = this.peekCodePoint(1); |
| 746 | const c3 = this.peekCodePoint(2); |
| 747 | |
| 748 | if (isIdentifierStart(c1, c2, c3)) { |
| 749 | const unit = this.consumeName(); |
| 750 | return {type: TokenType.DIMENSION_TOKEN, number, flags, unit}; |
| 751 | } |
| 752 | |
| 753 | if (c1 === PERCENTAGE_SIGN) { |
| 754 | this.consumeCodePoint(); |
| 755 | return {type: TokenType.PERCENTAGE_TOKEN, number, flags}; |
| 756 | } |
| 757 | |
| 758 | return {type: TokenType.NUMBER_TOKEN, number, flags}; |
| 759 | } |
| 760 | |
| 761 | private consumeEscapedCodePoint(): number { |
| 762 | const codePoint = this.consumeCodePoint(); |
no test coverage detected