(token: BlockCloseToken)
| 771 | } |
| 772 | |
| 773 | private _consumeBlockClose(token: BlockCloseToken) { |
| 774 | const initialStackLength = this._containerStack.length; |
| 775 | const topNode = this._containerStack[initialStackLength - 1]; |
| 776 | if (!this._popContainer(null, html.Block, token.sourceSpan)) { |
| 777 | if (this._containerStack.length < initialStackLength) { |
| 778 | const nodeName = topNode instanceof html.Component ? topNode.fullName : topNode.name; |
| 779 | this.errors.push( |
| 780 | TreeError.create( |
| 781 | null, |
| 782 | token.sourceSpan, |
| 783 | `Unexpected closing block. The block may have been closed earlier. ` + |
| 784 | `Did you forget to close the <${nodeName}> element? ` + |
| 785 | `If you meant to write the \`}\` character, you should use the "}" ` + |
| 786 | `HTML entity instead.`, |
| 787 | ), |
| 788 | ); |
| 789 | return; |
| 790 | } |
| 791 | |
| 792 | this.errors.push( |
| 793 | TreeError.create( |
| 794 | null, |
| 795 | token.sourceSpan, |
| 796 | `Unexpected closing block. The block may have been closed earlier. ` + |
| 797 | `If you meant to write the \`}\` character, you should use the "}" ` + |
| 798 | `HTML entity instead.`, |
| 799 | ), |
| 800 | ); |
| 801 | } |
| 802 | } |
| 803 | |
| 804 | private _consumeIncompleteBlock(token: IncompleteBlockOpenToken) { |
| 805 | const parameters: html.BlockParameter[] = []; |
no test coverage detected