MCPcopy Index your code
hub / github.com/angular/angular / _consumeBlockClose

Method _consumeBlockClose

packages/compiler/src/ml_parser/parser.ts:773–802  ·  view source on GitHub ↗
(token: BlockCloseToken)

Source from the content-addressed store, hash-verified

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 "&#125;" ` +
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 "&#125;" ` +
798 `HTML entity instead.`,
799 ),
800 );
801 }
802 }
803
804 private _consumeIncompleteBlock(token: IncompleteBlockOpenToken) {
805 const parameters: html.BlockParameter[] = [];

Callers 1

buildMethod · 0.95

Calls 3

_popContainerMethod · 0.95
createMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected