angular-cn/packages/language-service/ivy
Keen Yee Liau 323be39297 fix(language-service): hybrid visitor returns parent node of BoundAttribute (#38995)
For the following example, the cursor is between `keySpan` and `valueSpan`
of the `BoundAttribute`.
```html
<test-cmp [foo]¦="bar"></test-cmp>
```
Our hybrid visitor will return `Element`in this case, which is the parent
node of the `BoundAttribute`.
This is because we only look at the `keySpan` and `valueSpan`, and not
the source span. The last element in the AST path is `Element`, so it gets
returned.

In this PR, I propose fixing this by adding a sentinel value `undefined`
to the AST path to signal that we've found a source span but the cursor is
neither in the key span nor the value span.

PR Close #38995
2020-09-25 14:35:08 -04:00
..
test fix(language-service): hybrid visitor returns parent node of BoundAttribute (#38995) 2020-09-25 14:35:08 -04:00
BUILD.bazel feat(language-service): introduce hybrid visitor to locate AST node (#38540) 2020-08-24 09:24:18 -07:00
hybrid_visitor.ts fix(language-service): hybrid visitor returns parent node of BoundAttribute (#38995) 2020-09-25 14:35:08 -04:00
language_service.ts refactor(compiler-cli): Adjust output of TCB to support `TemplateTypeChecker` Symbol retrieval (#38618) 2020-09-10 12:40:38 -07:00
ts_plugin.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00