refactor(compiler): template element ast has endSourceSpan (#12138)
This commit is contained in:

committed by
Tobias Bosch

parent
f5b0e22d35
commit
e1faca6386
@ -124,7 +124,8 @@ export class ElementAst implements TemplateAst {
|
||||
public outputs: BoundEventAst[], public references: ReferenceAst[],
|
||||
public directives: DirectiveAst[], public providers: ProviderAst[],
|
||||
public hasViewContainer: boolean, public children: TemplateAst[],
|
||||
public ngContentIndex: number, public sourceSpan: ParseSourceSpan) {}
|
||||
public ngContentIndex: number, public sourceSpan: ParseSourceSpan,
|
||||
public endSourceSpan: ParseSourceSpan) {}
|
||||
|
||||
visit(visitor: TemplateAstVisitor, context: any): any {
|
||||
return visitor.visitElement(this, context);
|
||||
|
@ -442,8 +442,7 @@ class TemplateParseVisitor implements html.Visitor {
|
||||
nodeName, attrs, elementProps, events, references,
|
||||
providerContext.transformedDirectiveAsts, providerContext.transformProviders,
|
||||
providerContext.transformedHasViewContainer, children,
|
||||
hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);
|
||||
|
||||
hasInlineTemplates ? null : ngContentIndex, element.sourceSpan, element.endSourceSpan);
|
||||
this._findComponentDirectives(directiveAsts)
|
||||
.forEach(
|
||||
componentDirectiveAst => this._validateElementAnimationInputOutputs(
|
||||
@ -1083,7 +1082,7 @@ class NonBindableVisitor implements html.Visitor {
|
||||
const children = html.visitAll(this, ast.children, EMPTY_ELEMENT_CONTEXT);
|
||||
return new ElementAst(
|
||||
ast.name, html.visitAll(this, ast.attrs), [], [], [], [], [], false, children,
|
||||
ngContentIndex, ast.sourceSpan);
|
||||
ngContentIndex, ast.sourceSpan, ast.endSourceSpan);
|
||||
}
|
||||
visitComment(comment: html.Comment, context: any): any { return null; }
|
||||
|
||||
|
Reference in New Issue
Block a user