fix: make all tests green with new view engine and JIT
Note that this does not yet include enabling the view engine by default. Included refactoring: - view engine: split namespace of elements / attributes already when creating the `NodeDef` - view engine: when injecting the old `Renderer`, use an implementation that is based on `RendererV2` - view engine: store view queries in the component view, not on the host element
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
|
||||
import {NgAnalyzedModules} from '@angular/compiler/src/aot/compiler';
|
||||
import {CompileNgModuleMetadata} from '@angular/compiler/src/compile_metadata';
|
||||
import {CompilerConfig} from '@angular/compiler/src/config';
|
||||
import {Lexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {I18NHtmlParser} from '@angular/compiler/src/i18n/i18n_html_parser';
|
||||
@ -23,6 +24,7 @@ import {getDeclarationDiagnostics, getTemplateDiagnostics} from './diagnostics';
|
||||
import {getHover} from './hover';
|
||||
import {Completion, CompletionKind, Completions, Declaration, Declarations, Definition, Diagnostic, DiagnosticKind, Diagnostics, Hover, LanguageService, LanguageServiceHost, Location, PipeInfo, Pipes, Signature, Span, Symbol, SymbolDeclaration, SymbolQuery, SymbolTable, TemplateSource, TemplateSources} from './types';
|
||||
|
||||
|
||||
/**
|
||||
* Create an instance of an Angular `LanguageService`.
|
||||
*
|
||||
@ -114,8 +116,9 @@ class LanguageServiceImpl implements LanguageService {
|
||||
const rawHtmlParser = new HtmlParser();
|
||||
const htmlParser = new I18NHtmlParser(rawHtmlParser);
|
||||
const expressionParser = new Parser(new Lexer());
|
||||
const config = new CompilerConfig();
|
||||
const parser = new TemplateParser(
|
||||
expressionParser, new DomElementSchemaRegistry(), htmlParser, null, []);
|
||||
config, expressionParser, new DomElementSchemaRegistry(), htmlParser, null, []);
|
||||
const htmlResult = htmlParser.parse(template.source, '');
|
||||
const analyzedModules = this.host.getAnalyzedModules();
|
||||
let errors: Diagnostic[] = undefined;
|
||||
|
@ -131,7 +131,7 @@ export class TypeScriptServiceHost implements LanguageServiceHost {
|
||||
new DirectiveNormalizer(resourceLoader, urlResolver, htmlParser, config);
|
||||
|
||||
result = this._resolver = new CompileMetadataResolver(
|
||||
moduleResolver, directiveResolver, pipeResolver, new SummaryResolver(),
|
||||
config, moduleResolver, directiveResolver, pipeResolver, new SummaryResolver(),
|
||||
elementSchemaRegistry, directiveNormalizer, this._staticSymbolCache, this.reflector,
|
||||
(error, type) => this.collectError(error, type && type.filePath));
|
||||
}
|
||||
|
Reference in New Issue
Block a user