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

Method _consumeAttributes

packages/compiler/src/ml_parser/parser.ts:451–472  ·  view source on GitHub ↗
(
    attributesResult: html.Attribute[],
    commentsResult: html.StartTagComment[],
  )

Source from the content-addressed store, hash-verified

449 }
450
451 private _consumeAttributes(
452 attributesResult: html.Attribute[],
453 commentsResult: html.StartTagComment[],
454 ) {
455 while (
456 this._peek.type === TokenType.ATTR_NAME ||
457 this._peek.type === TokenType.IN_ELEMENT_COMMENT
458 ) {
459 if (this._peek.type === TokenType.ATTR_NAME) {
460 attributesResult.push(this._consumeAttr(this._advance<AttributeNameToken>()));
461 } else {
462 const commentToken = this._advance<InElementCommentToken>();
463 commentsResult.push(
464 new html.StartTagComment(
465 commentToken.parts[0],
466 commentToken.parts[1],
467 commentToken.sourceSpan,
468 ),
469 );
470 }
471 }
472 }
473
474 private _getTagDefinition(nodeOrName: html.Node | string): TagDefinition | null {
475 if (typeof nodeOrName === 'string') {

Callers 1

Calls 3

_consumeAttrMethod · 0.95
_advanceMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected