0847a0353b
The current logic in the compiler is to bail when there are errors when parsing a template into an HTML AST or when there are errors in the i18n metadata. As a result, a template with these types of parse errors _will not have any information for the language service_. This is because we never attempt to conver the HTML AST to a template AST in these scenarios, so there are no template AST nodes for the language service to look at for information. In addition, this also means that the errors are never displayed in the template to the user because there are no nodes to map the error to. This commit adds an option to the template parser to temporarily ignore the html parse and i18n meta errors and always perform the template AST conversion. At the end, the i18n and HTML parse errors are appended to the returned errors list. While this seems risky, it at least provides us with more information than we had before (which was 0) and it's only done in the context of the language service, when the compiler is configured to use poisoned data (HTML parse and i18n meta errors can be interpreted as a "poisoned" template). fixes angular/vscode-ng-language-service#1140 PR Close #41068 |
||
---|---|---|
.. | ||
util | ||
view | ||
BUILD.bazel | ||
README.md | ||
r3_ast_absolute_span_spec.ts | ||
r3_ast_spans_spec.ts | ||
r3_template_transform_spec.ts | ||
style_parser_spec.ts |
README.md
Tests in this directory are excluded from running in the browser and only run in node.