(token: BlockOpenStartToken)
| 619 | } |
| 620 | |
| 621 | private _consumeBlockOpen(token: BlockOpenStartToken) { |
| 622 | const parameters: html.BlockParameter[] = []; |
| 623 | |
| 624 | while (this._peek.type === TokenType.BLOCK_PARAMETER) { |
| 625 | const paramToken = this._advance<BlockParameterToken>(); |
| 626 | parameters.push(new html.BlockParameter(paramToken.parts[0], paramToken.sourceSpan)); |
| 627 | } |
| 628 | |
| 629 | if (this._peek.type === TokenType.BLOCK_OPEN_END) { |
| 630 | this._advance(); |
| 631 | } |
| 632 | |
| 633 | const end = this._peek.sourceSpan.fullStart; |
| 634 | const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); |
| 635 | // Create a separate `startSpan` because `span` will be modified when there is an `end` span. |
| 636 | const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); |
| 637 | const block = new html.Block(token.parts[0], parameters, [], span, token.sourceSpan, startSpan); |
| 638 | this._pushContainer(block, false); |
| 639 | } |
| 640 | |
| 641 | private _consumeBlockClose(token: BlockCloseToken) { |
| 642 | const initialStackLength = this._containerStack.length; |
no test coverage detected