(token: BlockOpenStartToken)
| 751 | } |
| 752 | |
| 753 | private _consumeBlockOpen(token: BlockOpenStartToken) { |
| 754 | const parameters: html.BlockParameter[] = []; |
| 755 | |
| 756 | while (this._peek.type === TokenType.BLOCK_PARAMETER) { |
| 757 | const paramToken = this._advance<BlockParameterToken>(); |
| 758 | parameters.push(new html.BlockParameter(paramToken.parts[0], paramToken.sourceSpan)); |
| 759 | } |
| 760 | |
| 761 | if (this._peek.type === TokenType.BLOCK_OPEN_END) { |
| 762 | this._advance(); |
| 763 | } |
| 764 | |
| 765 | const end = this._peek.sourceSpan.fullStart; |
| 766 | const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); |
| 767 | // Create a separate `startSpan` because `span` will be modified when there is an `end` span. |
| 768 | const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); |
| 769 | const block = new html.Block(token.parts[0], parameters, [], span, token.sourceSpan, startSpan); |
| 770 | this._pushContainer(block, false); |
| 771 | } |
| 772 | |
| 773 | private _consumeBlockClose(token: BlockCloseToken) { |
| 774 | const initialStackLength = this._containerStack.length; |
no test coverage detected