angular-cn/packages/language-service/ivy
Andrew Scott 6b4909c588 fix(compiler): Don't set expression text to synthetic `$implicit` when empty (#40583)
When parsing interpolations, if we encounter an empty interpolation
(`{{}}`), the current code uses a "pretend" value of `$implicit` for the
name as if the interplotion were really `{{$implicit}}`. This is
problematic because the spans are then incorrect downstream since they
are based off of the `$implicit` text.

This commit changes the interpretation of empty interpolations so that
the text is simply an empty string.

Fixes https://github.com/angular/vscode-ng-language-service/issues/1077
Fixes https://github.com/angular/vscode-ng-language-service/issues/1078

PR Close #40583
2021-01-28 09:06:17 -08:00
..
test fix(compiler): exclude trailing whitespace from element source spans (#40513) 2021-01-28 08:53:02 -08:00
BUILD.bazel feat(language-service): Add diagnostics to suggest turning on strict mode (#40423) 2021-01-25 14:17:31 -08:00
adapters.ts fix(language-service): implement realpath to resolve symlinks (#40593) 2021-01-27 10:36:04 -08:00
attribute_completions.ts feat(language-service): completions for structural directives (#40032) 2020-12-14 12:08:41 -08:00
compiler_factory.ts refactor(compiler-cli): introduce CompilationTicket system for NgCompiler (#40561) 2021-01-27 10:45:57 -08:00
completions.ts fix(compiler): Don't set expression text to synthetic `$implicit` when empty (#40583) 2021-01-28 09:06:17 -08:00
definitions.ts fix(language-service): fix go to definition for template variables and references (#40455) 2021-01-19 13:03:14 -08:00
display_parts.ts feat(language-service): complete attributes on elements (#40032) 2020-12-14 12:08:41 -08:00
language_service.ts feat(language-service): Add diagnostics to suggest turning on strict mode (#40423) 2021-01-25 14:17:31 -08:00
quick_info.ts refactor(compiler-cli): Enable pipe information when checkTypeOfPipes=false (#39555) 2020-12-11 16:19:15 -08:00
references.ts refactor(language-service): do not mutate the original template node span (#40484) 2021-01-20 16:59:54 -08:00
template_target.ts refactor(language-service): Have TemplateTarget recognize two way bindings (#40185) 2021-01-07 13:18:38 -08:00
ts_plugin.ts feat(language-service): Add diagnostics to suggest turning on strict mode (#40423) 2021-01-25 14:17:31 -08:00
ts_utils.ts fix(language-service): Do not include $event parameter in reference results (#40158) 2021-01-05 10:07:20 -08:00
utils.ts fix(language-service): fix go to definition for template variables and references (#40455) 2021-01-19 13:03:14 -08:00