MCPcopy Create free account
hub / github.com/angular/angular / _consumeComment

Method _consumeComment

packages/compiler/src/ml_parser/parser.ts:180–193  ·  view source on GitHub ↗
(token: CommentStartToken)

Source from the content-addressed store, hash-verified

178 }
179
180 private _consumeComment(token: CommentStartToken) {
181 const text = this._advanceIf(TokenType.RAW_TEXT);
182 const endToken = this._advanceIf(TokenType.COMMENT_END);
183 const value = text != null ? text.parts[0].trim() : null;
184 const sourceSpan =
185 endToken == null
186 ? token.sourceSpan
187 : new ParseSourceSpan(
188 token.sourceSpan.start,
189 endToken.sourceSpan.end,
190 token.sourceSpan.fullStart,
191 );
192 this._addToParent(new html.Comment(value, sourceSpan));
193 }
194
195 private _consumeExpansion(token: ExpansionFormStartToken) {
196 const switchValue = this._advance<TextToken>();

Callers 1

buildMethod · 0.95

Calls 2

_advanceIfMethod · 0.95
_addToParentMethod · 0.95

Tested by

no test coverage detected