* @returns whether an ICU token has been created * @internal
()
| 466 | * @internal |
| 467 | */ |
| 468 | private _tokenizeExpansionForm(): boolean { |
| 469 | if (this.isExpansionFormStart()) { |
| 470 | this._consumeExpansionFormStart(); |
| 471 | return true; |
| 472 | } |
| 473 | |
| 474 | if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) { |
| 475 | this._consumeExpansionCaseStart(); |
| 476 | return true; |
| 477 | } |
| 478 | |
| 479 | if (this._cursor.peek() === chars.$RBRACE) { |
| 480 | if (this._isInExpansionCase()) { |
| 481 | this._consumeExpansionCaseEnd(); |
| 482 | return true; |
| 483 | } |
| 484 | |
| 485 | if (this._isInExpansionForm()) { |
| 486 | this._consumeExpansionFormEnd(); |
| 487 | return true; |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | return false; |
| 492 | } |
| 493 | |
| 494 | private _beginToken(type: TokenType, start = this._cursor.clone()) { |
| 495 | this._currentTokenStart = start; |
no test coverage detected