feat(compiler): Propagate source span and value span to Variable AST (#36047)
This commit propagates the `sourceSpan` and `valueSpan` of a `VariableBinding` in a microsyntax expression to `ParsedVariable`, and subsequently to View Engine Variable AST and Ivy Variable AST. Note that this commit does not propagate the `keySpan`, because it involves significant changes to the template AST. PR Close #36047
This commit is contained in:

committed by
Andrew Kushnir

parent
e179c5827f
commit
31bec8ce61
@ -161,8 +161,8 @@ class HtmlAstToIvyAst implements html.Visitor {
|
||||
this.bindingParser.parseInlineTemplateBinding(
|
||||
templateKey, templateValue, attribute.sourceSpan, absoluteValueOffset, [],
|
||||
templateParsedProperties, parsedVariables);
|
||||
templateVariables.push(
|
||||
...parsedVariables.map(v => new t.Variable(v.name, v.value, v.sourceSpan)));
|
||||
templateVariables.push(...parsedVariables.map(
|
||||
v => new t.Variable(v.name, v.value, v.sourceSpan, v.valueSpan)));
|
||||
} else {
|
||||
// Check for variables, events, property bindings, interpolation
|
||||
hasBinding = this.parseAttribute(
|
||||
|
Reference in New Issue
Block a user