source: trip-planner-front/node_modules/@angular/compiler/esm2015/src/aot/compiler_factory.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 15.5 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { CompilerConfig } from '../config';
9import { ViewEncapsulation } from '../core';
10import { DirectiveNormalizer } from '../directive_normalizer';
11import { DirectiveResolver } from '../directive_resolver';
12import { Lexer } from '../expression_parser/lexer';
13import { Parser } from '../expression_parser/parser';
14import { I18NHtmlParser } from '../i18n/i18n_html_parser';
15import { InjectableCompiler } from '../injectable_compiler';
16import { CompileMetadataResolver } from '../metadata_resolver';
17import { HtmlParser } from '../ml_parser/html_parser';
18import { NgModuleCompiler } from '../ng_module_compiler';
19import { NgModuleResolver } from '../ng_module_resolver';
20import { TypeScriptEmitter } from '../output/ts_emitter';
21import { syntaxError } from '../parse_util';
22import { PipeResolver } from '../pipe_resolver';
23import { DomElementSchemaRegistry } from '../schema/dom_element_schema_registry';
24import { StyleCompiler } from '../style_compiler';
25import { TemplateParser } from '../template_parser/template_parser';
26import { TypeCheckCompiler } from '../view_compiler/type_check_compiler';
27import { ViewCompiler } from '../view_compiler/view_compiler';
28import { AotCompiler } from './compiler';
29import { StaticReflector } from './static_reflector';
30import { StaticSymbolCache } from './static_symbol';
31import { StaticSymbolResolver } from './static_symbol_resolver';
32import { AotSummaryResolver } from './summary_resolver';
33export function createAotUrlResolver(host) {
34 return {
35 resolve: (basePath, url) => {
36 const filePath = host.resourceNameToFileName(url, basePath);
37 if (!filePath) {
38 throw syntaxError(`Couldn't resolve resource ${url} from ${basePath}`);
39 }
40 return filePath;
41 }
42 };
43}
44/**
45 * Creates a new AotCompiler based on options and a host.
46 */
47export function createAotCompiler(compilerHost, options, errorCollector) {
48 let translations = options.translations || '';
49 const urlResolver = createAotUrlResolver(compilerHost);
50 const symbolCache = new StaticSymbolCache();
51 const summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);
52 const symbolResolver = new StaticSymbolResolver(compilerHost, symbolCache, summaryResolver);
53 const staticReflector = new StaticReflector(summaryResolver, symbolResolver, [], [], errorCollector);
54 let htmlParser;
55 if (!!options.enableIvy) {
56 // Ivy handles i18n at the compiler level so we must use a regular parser
57 htmlParser = new HtmlParser();
58 }
59 else {
60 htmlParser = new I18NHtmlParser(new HtmlParser(), translations, options.i18nFormat, options.missingTranslation, console);
61 }
62 const config = new CompilerConfig({
63 defaultEncapsulation: ViewEncapsulation.Emulated,
64 useJit: false,
65 missingTranslation: options.missingTranslation,
66 preserveWhitespaces: options.preserveWhitespaces,
67 strictInjectionParameters: options.strictInjectionParameters,
68 });
69 const normalizer = new DirectiveNormalizer({ get: (url) => compilerHost.loadResource(url) }, urlResolver, htmlParser, config);
70 const expressionParser = new Parser(new Lexer());
71 const elementSchemaRegistry = new DomElementSchemaRegistry();
72 const tmplParser = new TemplateParser(config, staticReflector, expressionParser, elementSchemaRegistry, htmlParser, console, []);
73 const resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector, errorCollector);
74 // TODO(vicb): do not pass options.i18nFormat here
75 const viewCompiler = new ViewCompiler(staticReflector);
76 const typeCheckCompiler = new TypeCheckCompiler(options, staticReflector);
77 const compiler = new AotCompiler(config, options, compilerHost, staticReflector, resolver, tmplParser, new StyleCompiler(urlResolver), viewCompiler, typeCheckCompiler, new NgModuleCompiler(staticReflector), new InjectableCompiler(staticReflector, !!options.enableIvy), new TypeScriptEmitter(), summaryResolver, symbolResolver);
78 return { compiler, reflector: staticReflector };
79}
80//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcGlsZXJfZmFjdG9yeS5qcyIsInNvdXJjZVJvb3QiOiI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