(
attributesResult: html.Attribute[],
commentsResult: html.StartTagComment[],
)
| 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') { |
no test coverage detected