* @returns whether an ICU token has been created * @internal
()
| 487 | * @internal |
| 488 | */ |
| 489 | private _tokenizeExpansionForm(): boolean { |
| 490 | if (this.isExpansionFormStart()) { |
| 491 | this._consumeExpansionFormStart(); |
| 492 | return true; |
| 493 | } |
| 494 | |
| 495 | if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) { |
| 496 | this._consumeExpansionCaseStart(); |
| 497 | return true; |
| 498 | } |
| 499 | |
| 500 | if (this._cursor.peek() === chars.$RBRACE) { |
| 501 | if (this._isInExpansionCase()) { |
| 502 | this._consumeExpansionCaseEnd(); |
| 503 | return true; |
| 504 | } |
| 505 | |
| 506 | if (this._isInExpansionForm()) { |
| 507 | this._consumeExpansionFormEnd(); |
| 508 | return true; |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | return false; |
| 513 | } |
| 514 | |
| 515 | private _beginToken(type: TokenType, start = this._cursor.clone()) { |
| 516 | this._currentTokenStart = start; |
no test coverage detected