From cdb1a237e5ff1bfb9c8b931dae712dc8e92cf6f9 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Mon, 1 Aug 2016 12:19:09 -0700 Subject: [PATCH] refactor(compiler): html_parser -> ml_parser --- modules/@angular/compiler/index.ts | 2 +- modules/@angular/compiler/private_export.ts | 4 +- modules/@angular/compiler/src/compiler.ts | 2 +- .../compiler/src/directive_normalizer.ts | 6 +-- .../compiler/src/expression_parser/parser.ts | 4 +- .../@angular/compiler/src/i18n/extractor.ts | 2 +- .../@angular/compiler/src/i18n/i18n_parser.ts | 6 +-- .../compiler/src/i18n/message_bundle.ts | 4 +- .../src/i18n/serializers/serializer.ts | 2 +- .../compiler/src/i18n/serializers/xmb.ts | 2 +- .../compiler/src/i18n/serializers/xtb.ts | 38 +++++++++---------- .../compiler/src/i18n/translation_bundle.ts | 2 +- .../src/{html_parser => ml_parser}/ast.ts | 0 .../{html_parser => ml_parser}/html_parser.ts | 0 .../{html_parser => ml_parser}/html_tags.ts | 0 .../icu_ast_expander.ts | 0 .../interpolation_config.ts | 0 .../src/{html_parser => ml_parser}/lexer.ts | 0 .../src/{html_parser => ml_parser}/parser.ts | 0 .../src/{html_parser => ml_parser}/tags.ts | 0 .../{html_parser => ml_parser}/xml_parser.ts | 0 .../{html_parser => ml_parser}/xml_tags.ts | 0 .../src/template_parser/template_parser.ts | 10 ++--- .../src/template_parser/template_preparser.ts | 4 +- .../test/expression_parser/unparser.ts | 2 +- .../compiler/test/i18n/extractor_spec.ts | 2 +- .../compiler/test/i18n/i18n_parser_spec.ts | 4 +- .../compiler/test/i18n/message_bundle_spec.ts | 4 +- .../test/i18n/serializers/xmb_spec.ts | 4 +- .../test/i18n/serializers/xtb_spec.ts | 6 +-- .../ast_serializer_spec.ts | 4 +- .../ast_spec_utils.ts | 4 +- .../html_parser_spec.ts | 6 +-- .../icu_ast_expander_spec.ts | 6 +-- .../{html_parser => ml_parser}/lexer_spec.ts | 6 +-- .../dom_element_schema_registry_spec.ts | 4 +- .../template_parser/template_parser_spec.ts | 2 +- .../template_preparser_spec.ts | 4 +- 38 files changed, 72 insertions(+), 74 deletions(-) rename modules/@angular/compiler/src/{html_parser => ml_parser}/ast.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/html_parser.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/html_tags.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/icu_ast_expander.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/interpolation_config.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/lexer.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/parser.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/tags.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/xml_parser.ts (100%) rename modules/@angular/compiler/src/{html_parser => ml_parser}/xml_tags.ts (100%) rename modules/@angular/compiler/test/{html_parser => ml_parser}/ast_serializer_spec.ts (96%) rename modules/@angular/compiler/test/{html_parser => ml_parser}/ast_spec_utils.ts (95%) rename modules/@angular/compiler/test/{html_parser => ml_parser}/html_parser_spec.ts (99%) rename modules/@angular/compiler/test/{html_parser => ml_parser}/icu_ast_expander_spec.ts (95%) rename modules/@angular/compiler/test/{html_parser => ml_parser}/lexer_spec.ts (99%) diff --git a/modules/@angular/compiler/index.ts b/modules/@angular/compiler/index.ts index a0bd95ad4d..1dc751de3a 100644 --- a/modules/@angular/compiler/index.ts +++ b/modules/@angular/compiler/index.ts @@ -14,7 +14,7 @@ import * as i18n from './src/i18n/index'; export {COMPILER_PROVIDERS, CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileFactoryMetadata, CompileIdentifierMetadata, CompileMetadataWithIdentifier, CompilePipeMetadata, CompileProviderMetadata, CompileQueryMetadata, CompileTemplateMetadata, CompileTokenMetadata, CompileTypeMetadata, CompilerConfig, DEFAULT_PACKAGE_URL_PROVIDER, DirectiveResolver, NgModuleResolver, OfflineCompiler, PipeResolver, RenderTypes, RuntimeCompiler, SourceModule, TEMPLATE_TRANSFORMS, UrlResolver, XHR, analyzeAppProvidersForDeprecatedConfiguration, createOfflineCompileUrlResolver, platformCoreDynamic} from './src/compiler'; -export {InterpolationConfig} from './src/html_parser/interpolation_config'; +export {InterpolationConfig} from './src/ml_parser/interpolation_config'; export {ElementSchemaRegistry} from './src/schema/element_schema_registry'; export {i18n}; diff --git a/modules/@angular/compiler/private_export.ts b/modules/@angular/compiler/private_export.ts index 5b0d880f9c..4c30248771 100644 --- a/modules/@angular/compiler/private_export.ts +++ b/modules/@angular/compiler/private_export.ts @@ -9,9 +9,9 @@ import * as directive_normalizer from './src/directive_normalizer'; import * as lexer from './src/expression_parser/lexer'; import * as parser from './src/expression_parser/parser'; -import * as html_parser from './src/html_parser/html_parser'; -import * as interpolation_config from './src/html_parser/interpolation_config'; import * as metadata_resolver from './src/metadata_resolver'; +import * as html_parser from './src/ml_parser/html_parser'; +import * as interpolation_config from './src/ml_parser/interpolation_config'; import * as ng_module_compiler from './src/ng_module_compiler'; import * as path_util from './src/output/path_util'; import * as ts_emitter from './src/output/ts_emitter'; diff --git a/modules/@angular/compiler/src/compiler.ts b/modules/@angular/compiler/src/compiler.ts index 3c04b65cb6..8f7153d6d5 100644 --- a/modules/@angular/compiler/src/compiler.ts +++ b/modules/@angular/compiler/src/compiler.ts @@ -24,7 +24,7 @@ export {NgModuleResolver} from './ng_module_resolver'; import {stringify} from './facade/lang'; import {ListWrapper} from './facade/collection'; import {TemplateParser} from './template_parser/template_parser'; -import {HtmlParser} from './html_parser/html_parser'; +import {HtmlParser} from './ml_parser/html_parser'; import {DirectiveNormalizer} from './directive_normalizer'; import {CompileMetadataResolver} from './metadata_resolver'; import {StyleCompiler} from './style_compiler'; diff --git a/modules/@angular/compiler/src/directive_normalizer.ts b/modules/@angular/compiler/src/directive_normalizer.ts index 51163e0a96..e953daa8f2 100644 --- a/modules/@angular/compiler/src/directive_normalizer.ts +++ b/modules/@angular/compiler/src/directive_normalizer.ts @@ -13,9 +13,9 @@ import {CompilerConfig} from './config'; import {MapWrapper} from './facade/collection'; import {BaseException} from './facade/exceptions'; import {isBlank, isPresent} from './facade/lang'; -import * as html from './html_parser/ast'; -import {HtmlParser} from './html_parser/html_parser'; -import {InterpolationConfig} from './html_parser/interpolation_config'; +import * as html from './ml_parser/ast'; +import {HtmlParser} from './ml_parser/html_parser'; +import {InterpolationConfig} from './ml_parser/interpolation_config'; import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver'; import {PreparsedElementType, preparseElement} from './template_parser/template_preparser'; import {UrlResolver} from './url_resolver'; diff --git a/modules/@angular/compiler/src/expression_parser/parser.ts b/modules/@angular/compiler/src/expression_parser/parser.ts index 6f37f3a495..b56d7df101 100644 --- a/modules/@angular/compiler/src/expression_parser/parser.ts +++ b/modules/@angular/compiler/src/expression_parser/parser.ts @@ -9,10 +9,8 @@ import {Injectable} from '@angular/core'; import * as chars from '../chars'; -import {ListWrapper} from '../facade/collection'; -import {BaseException} from '../facade/exceptions'; import {StringWrapper, escapeRegExp, isBlank, isPresent} from '../facade/lang'; -import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../html_parser/interpolation_config'; +import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../ml_parser/interpolation_config'; import {AST, ASTWithSource, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, ParseSpan, ParserError, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead, TemplateBinding} from './ast'; import {EOF, Lexer, Token, TokenType, isIdentifier, isQuote} from './lexer'; diff --git a/modules/@angular/compiler/src/i18n/extractor.ts b/modules/@angular/compiler/src/i18n/extractor.ts index 025941d798..7add249824 100644 --- a/modules/@angular/compiler/src/i18n/extractor.ts +++ b/modules/@angular/compiler/src/i18n/extractor.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import * as html from '../html_parser/ast'; +import * as html from '../ml_parser/ast'; import {I18nError} from './parse_util'; const _I18N_ATTR = 'i18n'; diff --git a/modules/@angular/compiler/src/i18n/i18n_parser.ts b/modules/@angular/compiler/src/i18n/i18n_parser.ts index 7f4bfd8842..92bbf96066 100644 --- a/modules/@angular/compiler/src/i18n/i18n_parser.ts +++ b/modules/@angular/compiler/src/i18n/i18n_parser.ts @@ -8,9 +8,9 @@ import {Lexer as ExpressionLexer} from '../expression_parser/lexer'; import {Parser as ExpressionParser} from '../expression_parser/parser'; -import * as html from '../html_parser/ast'; -import {getHtmlTagDefinition} from '../html_parser/html_tags'; -import {InterpolationConfig} from '../html_parser/interpolation_config'; +import * as html from '../ml_parser/ast'; +import {getHtmlTagDefinition} from '../ml_parser/html_tags'; +import {InterpolationConfig} from '../ml_parser/interpolation_config'; import {ParseSourceSpan} from '../parse_util'; import {extractAstMessages} from './extractor'; diff --git a/modules/@angular/compiler/src/i18n/message_bundle.ts b/modules/@angular/compiler/src/i18n/message_bundle.ts index eed82dde17..f9325c1ff6 100644 --- a/modules/@angular/compiler/src/i18n/message_bundle.ts +++ b/modules/@angular/compiler/src/i18n/message_bundle.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import {HtmlParser} from '../html_parser/html_parser'; -import {InterpolationConfig} from '../html_parser/interpolation_config'; +import {HtmlParser} from '../ml_parser/html_parser'; +import {InterpolationConfig} from '../ml_parser/interpolation_config'; import {ParseError} from '../parse_util'; import * as i18n from './i18n_ast'; diff --git a/modules/@angular/compiler/src/i18n/serializers/serializer.ts b/modules/@angular/compiler/src/i18n/serializers/serializer.ts index e5f4effd79..ad8565c204 100644 --- a/modules/@angular/compiler/src/i18n/serializers/serializer.ts +++ b/modules/@angular/compiler/src/i18n/serializers/serializer.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import * as html from '../../html_parser/ast'; +import * as html from '../../ml_parser/ast'; import * as i18n from '../i18n_ast'; export interface Serializer { diff --git a/modules/@angular/compiler/src/i18n/serializers/xmb.ts b/modules/@angular/compiler/src/i18n/serializers/xmb.ts index bed72a66dc..fc87064e05 100644 --- a/modules/@angular/compiler/src/i18n/serializers/xmb.ts +++ b/modules/@angular/compiler/src/i18n/serializers/xmb.ts @@ -7,7 +7,7 @@ */ import {ListWrapper} from '../../facade/collection'; -import * as html from '../../html_parser/ast'; +import * as html from '../../ml_parser/ast'; import * as i18n from '../i18n_ast'; import {Serializer} from './serializer'; diff --git a/modules/@angular/compiler/src/i18n/serializers/xtb.ts b/modules/@angular/compiler/src/i18n/serializers/xtb.ts index 406e313787..485b00d2b6 100644 --- a/modules/@angular/compiler/src/i18n/serializers/xtb.ts +++ b/modules/@angular/compiler/src/i18n/serializers/xtb.ts @@ -6,10 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ -import * as xml from '../../html_parser/ast'; -import {HtmlParser} from '../../html_parser/html_parser'; -import {InterpolationConfig} from '../../html_parser/interpolation_config'; -import {XmlParser} from '../../html_parser/xml_parser'; +import * as ml from '../../ml_parser/ast'; +import {HtmlParser} from '../../ml_parser/html_parser'; +import {InterpolationConfig} from '../../ml_parser/interpolation_config'; +import {XmlParser} from '../../ml_parser/xml_parser'; import {ParseError} from '../../parse_util'; import * as i18n from '../i18n_ast'; import {I18nError} from '../parse_util'; @@ -26,7 +26,7 @@ export class Xtb implements Serializer { write(messageMap: {[id: string]: i18n.Message}): string { throw new Error('Unsupported'); } load(content: string, url: string, placeholders: {[id: string]: {[name: string]: string}}): - {[id: string]: xml.Node[]} { + {[id: string]: ml.Node[]} { // Parse the xtb file into xml nodes const result = new XmlParser().parse(content, url); @@ -43,7 +43,7 @@ export class Xtb implements Serializer { // Convert the string messages to html ast // TODO(vicb): map error message back to the original message in xtb - let messageMap: {[id: string]: xml.Node[]} = {}; + let messageMap: {[id: string]: ml.Node[]} = {}; let parseErrors: ParseError[] = []; Object.keys(messages).forEach((id) => { @@ -60,7 +60,7 @@ export class Xtb implements Serializer { } } -class _Serializer implements xml.Visitor { +class _Serializer implements ml.Visitor { private _messages: {[id: string]: string}; private _bundleDepth: number; private _translationDepth: number; @@ -68,7 +68,7 @@ class _Serializer implements xml.Visitor { private _placeholders: {[id: string]: {[name: string]: string}}; private _currentPlaceholders: {[name: string]: string}; - parse(nodes: xml.Node[], _placeholders: {[id: string]: {[name: string]: string}}): + parse(nodes: ml.Node[], _placeholders: {[id: string]: {[name: string]: string}}): {messages: {[k: string]: string}, errors: I18nError[]} { this._messages = {}; this._bundleDepth = 0; @@ -76,19 +76,19 @@ class _Serializer implements xml.Visitor { this._errors = []; this._placeholders = _placeholders; - xml.visitAll(this, nodes, null); + ml.visitAll(this, nodes, null); return {messages: this._messages, errors: this._errors}; } - visitElement(element: xml.Element, context: any): any { + visitElement(element: ml.Element, context: any): any { switch (element.name) { case _TRANSLATIONS_TAG: this._bundleDepth++; if (this._bundleDepth > 1) { this._addError(element, `<${_TRANSLATIONS_TAG}> elements can not be nested`); } - xml.visitAll(this, element.children, null); + ml.visitAll(this, element.children, null); this._bundleDepth--; break; @@ -102,7 +102,7 @@ class _Serializer implements xml.Visitor { this._addError(element, `<${_TRANSLATION_TAG}> misses the "id" attribute`); } else { this._currentPlaceholders = this._placeholders[idAttr.value] || {}; - this._messages[idAttr.value] = xml.visitAll(this, element.children).join(''); + this._messages[idAttr.value] = ml.visitAll(this, element.children).join(''); } this._translationDepth--; break; @@ -125,25 +125,25 @@ class _Serializer implements xml.Visitor { } } - visitAttribute(attribute: xml.Attribute, context: any): any { + visitAttribute(attribute: ml.Attribute, context: any): any { throw new Error('unreachable code'); } - visitText(text: xml.Text, context: any): any { return text.value; } + visitText(text: ml.Text, context: any): any { return text.value; } - visitComment(comment: xml.Comment, context: any): any { return ''; } + visitComment(comment: ml.Comment, context: any): any { return ''; } - visitExpansion(expansion: xml.Expansion, context: any): any { + visitExpansion(expansion: ml.Expansion, context: any): any { const strCases = expansion.cases.map(c => c.visit(this, null)); return `{${expansion.switchValue}, ${expansion.type}, strCases.join(' ')}`; } - visitExpansionCase(expansionCase: xml.ExpansionCase, context: any): any { - return `${expansionCase.value} {${xml.visitAll(this, expansionCase.expression, null)}}`; + visitExpansionCase(expansionCase: ml.ExpansionCase, context: any): any { + return `${expansionCase.value} {${ml.visitAll(this, expansionCase.expression, null)}}`; } - private _addError(node: xml.Node, message: string): void { + private _addError(node: ml.Node, message: string): void { this._errors.push(new I18nError(node.sourceSpan, message)); } } diff --git a/modules/@angular/compiler/src/i18n/translation_bundle.ts b/modules/@angular/compiler/src/i18n/translation_bundle.ts index d8e4e10cc7..b4e7e82762 100644 --- a/modules/@angular/compiler/src/i18n/translation_bundle.ts +++ b/modules/@angular/compiler/src/i18n/translation_bundle.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import * as html from '../html_parser/ast'; +import * as html from '../ml_parser/ast'; import {Serializer} from './serializers/serializer'; diff --git a/modules/@angular/compiler/src/html_parser/ast.ts b/modules/@angular/compiler/src/ml_parser/ast.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/ast.ts rename to modules/@angular/compiler/src/ml_parser/ast.ts diff --git a/modules/@angular/compiler/src/html_parser/html_parser.ts b/modules/@angular/compiler/src/ml_parser/html_parser.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/html_parser.ts rename to modules/@angular/compiler/src/ml_parser/html_parser.ts diff --git a/modules/@angular/compiler/src/html_parser/html_tags.ts b/modules/@angular/compiler/src/ml_parser/html_tags.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/html_tags.ts rename to modules/@angular/compiler/src/ml_parser/html_tags.ts diff --git a/modules/@angular/compiler/src/html_parser/icu_ast_expander.ts b/modules/@angular/compiler/src/ml_parser/icu_ast_expander.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/icu_ast_expander.ts rename to modules/@angular/compiler/src/ml_parser/icu_ast_expander.ts diff --git a/modules/@angular/compiler/src/html_parser/interpolation_config.ts b/modules/@angular/compiler/src/ml_parser/interpolation_config.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/interpolation_config.ts rename to modules/@angular/compiler/src/ml_parser/interpolation_config.ts diff --git a/modules/@angular/compiler/src/html_parser/lexer.ts b/modules/@angular/compiler/src/ml_parser/lexer.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/lexer.ts rename to modules/@angular/compiler/src/ml_parser/lexer.ts diff --git a/modules/@angular/compiler/src/html_parser/parser.ts b/modules/@angular/compiler/src/ml_parser/parser.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/parser.ts rename to modules/@angular/compiler/src/ml_parser/parser.ts diff --git a/modules/@angular/compiler/src/html_parser/tags.ts b/modules/@angular/compiler/src/ml_parser/tags.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/tags.ts rename to modules/@angular/compiler/src/ml_parser/tags.ts diff --git a/modules/@angular/compiler/src/html_parser/xml_parser.ts b/modules/@angular/compiler/src/ml_parser/xml_parser.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/xml_parser.ts rename to modules/@angular/compiler/src/ml_parser/xml_parser.ts diff --git a/modules/@angular/compiler/src/html_parser/xml_tags.ts b/modules/@angular/compiler/src/ml_parser/xml_tags.ts similarity index 100% rename from modules/@angular/compiler/src/html_parser/xml_tags.ts rename to modules/@angular/compiler/src/ml_parser/xml_tags.ts diff --git a/modules/@angular/compiler/src/template_parser/template_parser.ts b/modules/@angular/compiler/src/template_parser/template_parser.ts index f9c55e535c..489564a82d 100644 --- a/modules/@angular/compiler/src/template_parser/template_parser.ts +++ b/modules/@angular/compiler/src/template_parser/template_parser.ts @@ -15,11 +15,11 @@ import {Parser} from '../expression_parser/parser'; import {ListWrapper, SetWrapper, StringMapWrapper} from '../facade/collection'; import {BaseException} from '../facade/exceptions'; import {isBlank, isPresent} from '../facade/lang'; -import * as html from '../html_parser/ast'; -import {HtmlParser, ParseTreeResult} from '../html_parser/html_parser'; -import {expandNodes} from '../html_parser/icu_ast_expander'; -import {InterpolationConfig} from '../html_parser/interpolation_config'; -import {mergeNsAndName, splitNsName} from '../html_parser/tags'; +import * as html from '../ml_parser/ast'; +import {HtmlParser, ParseTreeResult} from '../ml_parser/html_parser'; +import {expandNodes} from '../ml_parser/icu_ast_expander'; +import {InterpolationConfig} from '../ml_parser/interpolation_config'; +import {mergeNsAndName, splitNsName} from '../ml_parser/tags'; import {Identifiers, identifierToken} from '../identifiers'; import {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util'; import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer'; diff --git a/modules/@angular/compiler/src/template_parser/template_preparser.ts b/modules/@angular/compiler/src/template_parser/template_preparser.ts index 4bab363944..5f164e970f 100644 --- a/modules/@angular/compiler/src/template_parser/template_preparser.ts +++ b/modules/@angular/compiler/src/template_parser/template_preparser.ts @@ -6,8 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -import * as html from '../html_parser/ast'; -import {splitNsName} from '../html_parser/tags'; +import * as html from '../ml_parser/ast'; +import {splitNsName} from '../ml_parser/tags'; const NG_CONTENT_SELECT_ATTR = 'select'; const NG_CONTENT_ELEMENT = 'ng-content'; diff --git a/modules/@angular/compiler/test/expression_parser/unparser.ts b/modules/@angular/compiler/test/expression_parser/unparser.ts index 75380252dc..6d1c835d9c 100644 --- a/modules/@angular/compiler/test/expression_parser/unparser.ts +++ b/modules/@angular/compiler/test/expression_parser/unparser.ts @@ -8,7 +8,7 @@ import {AST, AstVisitor, Binary, BindingPipe, Chain, Conditional, EmptyExpr, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead} from '../../src/expression_parser/ast'; import {StringWrapper, isPresent, isString} from '../../src/facade/lang'; -import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/html_parser/interpolation_config'; +import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/ml_parser/interpolation_config'; class Unparser implements AstVisitor { private static _quoteRegExp = /"/g; diff --git a/modules/@angular/compiler/test/i18n/extractor_spec.ts b/modules/@angular/compiler/test/i18n/extractor_spec.ts index 881db955dd..cf00a86d98 100644 --- a/modules/@angular/compiler/test/i18n/extractor_spec.ts +++ b/modules/@angular/compiler/test/i18n/extractor_spec.ts @@ -9,7 +9,7 @@ import {ExtractionResult, extractAstMessages} from '@angular/compiler/src/i18n/extractor'; import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal'; -import {HtmlParser} from '../../src/html_parser/html_parser'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; import {serializeAst} from '../html_parser/ast_serializer_spec'; export function main() { diff --git a/modules/@angular/compiler/test/i18n/i18n_parser_spec.ts b/modules/@angular/compiler/test/i18n/i18n_parser_spec.ts index de6bfbda92..c226212416 100644 --- a/modules/@angular/compiler/test/i18n/i18n_parser_spec.ts +++ b/modules/@angular/compiler/test/i18n/i18n_parser_spec.ts @@ -10,9 +10,9 @@ import {Message} from '@angular/compiler/src/i18n/i18n_ast'; import {extractI18nMessages} from '@angular/compiler/src/i18n/i18n_parser'; import {ddescribe, describe, expect, it} from '@angular/core/testing/testing_internal'; -import {HtmlParser} from '../../src/html_parser/html_parser'; -import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/html_parser/interpolation_config'; import {serializeAst} from '../../src/i18n/message_bundle'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; +import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/ml_parser/interpolation_config'; export function main() { describe('I18nParser', () => { diff --git a/modules/@angular/compiler/test/i18n/message_bundle_spec.ts b/modules/@angular/compiler/test/i18n/message_bundle_spec.ts index d66bc1f4fe..eb963475b4 100644 --- a/modules/@angular/compiler/test/i18n/message_bundle_spec.ts +++ b/modules/@angular/compiler/test/i18n/message_bundle_spec.ts @@ -10,9 +10,9 @@ import * as i18n from '@angular/compiler/src/i18n/i18n_ast'; import {Serializer} from '@angular/compiler/src/i18n/serializers/serializer'; import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal'; -import {HtmlParser} from '../../src/html_parser/html_parser'; -import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/html_parser/interpolation_config'; import {MessageBundle, serializeAst, strHash} from '../../src/i18n/message_bundle'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; +import {DEFAULT_INTERPOLATION_CONFIG} from '../../src/ml_parser/interpolation_config'; export function main(): void { describe('MessageBundle', () => { diff --git a/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts b/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts index 7a5c6f0960..1e4f6ab3a5 100644 --- a/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts +++ b/modules/@angular/compiler/test/i18n/serializers/xmb_spec.ts @@ -9,9 +9,9 @@ import {Xmb} from '@angular/compiler/src/i18n/serializers/xmb'; import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal'; -import {HtmlParser} from '../../../src/html_parser/html_parser'; -import {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/html_parser/interpolation_config'; import {MessageBundle} from '../../../src/i18n/message_bundle'; +import {HtmlParser} from '../../../src/ml_parser/html_parser'; +import {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/ml_parser/interpolation_config'; export function main(): void { describe('XMB serializer', () => { diff --git a/modules/@angular/compiler/test/i18n/serializers/xtb_spec.ts b/modules/@angular/compiler/test/i18n/serializers/xtb_spec.ts index fa1bdfee93..798068c839 100644 --- a/modules/@angular/compiler/test/i18n/serializers/xtb_spec.ts +++ b/modules/@angular/compiler/test/i18n/serializers/xtb_spec.ts @@ -10,9 +10,9 @@ import {Xtb} from '@angular/compiler/src/i18n/serializers/xtb'; import {escapeRegExp} from '@angular/core/src/facade/lang'; import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal'; -import {HtmlParser} from '../../../src/html_parser/html_parser'; -import {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/html_parser/interpolation_config'; -import {serializeAst} from '../../html_parser/ast_serializer_spec'; +import {HtmlParser} from '../../../src/ml_parser/html_parser'; +import {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/ml_parser/interpolation_config'; +import {serializeAst} from '../../ml_parser/ast_serializer_spec'; export function main(): void { describe('XTB serializer', () => { diff --git a/modules/@angular/compiler/test/html_parser/ast_serializer_spec.ts b/modules/@angular/compiler/test/ml_parser/ast_serializer_spec.ts similarity index 96% rename from modules/@angular/compiler/test/html_parser/ast_serializer_spec.ts rename to modules/@angular/compiler/test/ml_parser/ast_serializer_spec.ts index 27bd358dd9..2f19fa7951 100644 --- a/modules/@angular/compiler/test/html_parser/ast_serializer_spec.ts +++ b/modules/@angular/compiler/test/ml_parser/ast_serializer_spec.ts @@ -7,8 +7,8 @@ */ import {beforeEach, ddescribe, describe, expect, it} from '../../../core/testing/testing_internal'; -import * as html from '../../src/html_parser/ast'; -import {HtmlParser} from '../../src/html_parser/html_parser'; +import * as html from '../../src/ml_parser/ast'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; export function main() { describe('Node serilaizer', () => { diff --git a/modules/@angular/compiler/test/html_parser/ast_spec_utils.ts b/modules/@angular/compiler/test/ml_parser/ast_spec_utils.ts similarity index 95% rename from modules/@angular/compiler/test/html_parser/ast_spec_utils.ts rename to modules/@angular/compiler/test/ml_parser/ast_spec_utils.ts index 5ba5d0f8b9..791410e031 100644 --- a/modules/@angular/compiler/test/html_parser/ast_spec_utils.ts +++ b/modules/@angular/compiler/test/ml_parser/ast_spec_utils.ts @@ -7,8 +7,8 @@ */ import {BaseException} from '../../src/facade/exceptions'; -import * as html from '../../src/html_parser/ast'; -import {ParseTreeResult} from '../../src/html_parser/html_parser'; +import * as html from '../../src/ml_parser/ast'; +import {ParseTreeResult} from '../../src/ml_parser/html_parser'; import {ParseLocation} from '../../src/parse_util'; export function humanizeDom(parseResult: ParseTreeResult, addSourceSpan: boolean = false): any[] { diff --git a/modules/@angular/compiler/test/html_parser/html_parser_spec.ts b/modules/@angular/compiler/test/ml_parser/html_parser_spec.ts similarity index 99% rename from modules/@angular/compiler/test/html_parser/html_parser_spec.ts rename to modules/@angular/compiler/test/ml_parser/html_parser_spec.ts index 41a49e200a..49bb0e2ce9 100644 --- a/modules/@angular/compiler/test/html_parser/html_parser_spec.ts +++ b/modules/@angular/compiler/test/ml_parser/html_parser_spec.ts @@ -7,9 +7,9 @@ */ import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal'; -import * as html from '../../src/html_parser/ast'; -import {HtmlParser, ParseTreeResult, TreeError} from '../../src/html_parser/html_parser'; -import {TokenType} from '../../src/html_parser/lexer'; +import * as html from '../../src/ml_parser/ast'; +import {HtmlParser, ParseTreeResult, TreeError} from '../../src/ml_parser/html_parser'; +import {TokenType} from '../../src/ml_parser/lexer'; import {ParseError} from '../../src/parse_util'; import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './ast_spec_utils'; diff --git a/modules/@angular/compiler/test/html_parser/icu_ast_expander_spec.ts b/modules/@angular/compiler/test/ml_parser/icu_ast_expander_spec.ts similarity index 95% rename from modules/@angular/compiler/test/html_parser/icu_ast_expander_spec.ts rename to modules/@angular/compiler/test/ml_parser/icu_ast_expander_spec.ts index 7e4b3ed7b0..ee1126ccba 100644 --- a/modules/@angular/compiler/test/html_parser/icu_ast_expander_spec.ts +++ b/modules/@angular/compiler/test/ml_parser/icu_ast_expander_spec.ts @@ -7,9 +7,9 @@ */ import {ddescribe, describe, expect, iit, it} from '../../../core/testing/testing_internal'; -import * as html from '../../src/html_parser/ast'; -import {HtmlParser} from '../../src/html_parser/html_parser'; -import {ExpansionResult, expandNodes} from '../../src/html_parser/icu_ast_expander'; +import * as html from '../../src/ml_parser/ast'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; +import {ExpansionResult, expandNodes} from '../../src/ml_parser/icu_ast_expander'; import {ParseError} from '../../src/parse_util'; import {humanizeNodes} from './ast_spec_utils'; diff --git a/modules/@angular/compiler/test/html_parser/lexer_spec.ts b/modules/@angular/compiler/test/ml_parser/lexer_spec.ts similarity index 99% rename from modules/@angular/compiler/test/html_parser/lexer_spec.ts rename to modules/@angular/compiler/test/ml_parser/lexer_spec.ts index a7fcc91abe..c0910886bd 100644 --- a/modules/@angular/compiler/test/html_parser/lexer_spec.ts +++ b/modules/@angular/compiler/test/ml_parser/lexer_spec.ts @@ -7,9 +7,9 @@ */ import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal'; -import {getHtmlTagDefinition} from '../../src/html_parser/html_tags'; -import {InterpolationConfig} from '../../src/html_parser/interpolation_config'; -import * as lex from '../../src/html_parser/lexer'; +import {getHtmlTagDefinition} from '../../src/ml_parser/html_tags'; +import {InterpolationConfig} from '../../src/ml_parser/interpolation_config'; +import * as lex from '../../src/ml_parser/lexer'; import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_util'; export function main() { diff --git a/modules/@angular/compiler/test/schema/dom_element_schema_registry_spec.ts b/modules/@angular/compiler/test/schema/dom_element_schema_registry_spec.ts index d741cf709b..d3a68f47cd 100644 --- a/modules/@angular/compiler/test/schema/dom_element_schema_registry_spec.ts +++ b/modules/@angular/compiler/test/schema/dom_element_schema_registry_spec.ts @@ -11,8 +11,8 @@ import {CUSTOM_ELEMENTS_SCHEMA, SecurityContext} from '@angular/core'; import {beforeEach, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal'; import {browserDetection} from '@angular/platform-browser/testing/browser_util'; -import {Element} from '../../src/html_parser/ast'; -import {HtmlParser} from '../../src/html_parser/html_parser'; +import {Element} from '../../src/ml_parser/ast'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; import {extractSchema} from './schema_extractor'; diff --git a/modules/@angular/compiler/test/template_parser/template_parser_spec.ts b/modules/@angular/compiler/test/template_parser/template_parser_spec.ts index ebb362bf92..30fd853f02 100644 --- a/modules/@angular/compiler/test/template_parser/template_parser_spec.ts +++ b/modules/@angular/compiler/test/template_parser/template_parser_spec.ts @@ -17,8 +17,8 @@ import {Console} from '@angular/core/src/console'; import {TestBed} from '@angular/core/testing'; import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; -import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/html_parser/interpolation_config'; import {Identifiers, identifierToken} from '../../src/identifiers'; +import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/ml_parser/interpolation_config'; import {unparse} from '../expression_parser/unparser'; import {TEST_COMPILER_PROVIDERS} from '../test_bindings'; diff --git a/modules/@angular/compiler/test/template_parser/template_preparser_spec.ts b/modules/@angular/compiler/test/template_parser/template_preparser_spec.ts index 3c49989c1a..f2abcb7134 100644 --- a/modules/@angular/compiler/test/template_parser/template_preparser_spec.ts +++ b/modules/@angular/compiler/test/template_parser/template_preparser_spec.ts @@ -7,8 +7,8 @@ */ import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../../core/testing/testing_internal'; -import {Element} from '../../src/html_parser/ast'; -import {HtmlParser} from '../../src/html_parser/html_parser'; +import {Element} from '../../src/ml_parser/ast'; +import {HtmlParser} from '../../src/ml_parser/html_parser'; import {PreparsedElement, PreparsedElementType, preparseElement} from '../../src/template_parser/template_preparser'; export function main() {