refactor(compiler): rename _ParseAST.optionalCharacter TemplateBinding.expression (#35886)

This commit renames
1. _ParseAST.optionalCharacter -> consumeOptionalCharacter
2. TemplateBinding.expression -> value

PR Close #35886
This commit is contained in:
Keen Yee Liau
2020-03-05 15:05:30 -08:00
committed by Matias Niemelä
parent 59078c444c
commit bef14cf424
6 changed files with 39 additions and 39 deletions

View File

@ -567,8 +567,8 @@ class ExpressionVisitor extends NullTemplateVisitor {
}
}
if (binding.expression && inSpan(valueRelativePosition, binding.expression.ast.span)) {
this.processExpressionCompletions(binding.expression.ast);
if (binding.value && inSpan(valueRelativePosition, binding.value.ast.span)) {
this.processExpressionCompletions(binding.value.ast);
return;
}

View File

@ -209,10 +209,10 @@ function getSymbolInMicrosyntax(info: AstResult, path: TemplateAstPath, attribut
// Find the symbol that contains the position.
templateBindings.filter(tb => !tb.keyIsVar).forEach(tb => {
if (inSpan(valueRelativePosition, tb.expression?.ast.span)) {
if (inSpan(valueRelativePosition, tb.value?.ast.span)) {
const dinfo = diagnosticInfoFromTemplateInfo(info);
const scope = getExpressionScope(dinfo, path);
result = getExpressionSymbol(scope, tb.expression !, path.position, info.template.query);
result = getExpressionSymbol(scope, tb.value !, path.position, info.template.query);
} else if (inSpan(valueRelativePosition, tb.span)) {
const template = path.first(EmbeddedTemplateAst);
if (template) {