refactor(compiler): html_parser -> ml_parser

This commit is contained in:
Victor Berchet 2016-08-01 12:19:09 -07:00
parent fcafdff10b
commit cdb1a237e5
38 changed files with 72 additions and 74 deletions

View File

@ -14,7 +14,7 @@
import * as i18n from './src/i18n/index'; 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 {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 {ElementSchemaRegistry} from './src/schema/element_schema_registry';
export {i18n}; export {i18n};

View File

@ -9,9 +9,9 @@
import * as directive_normalizer from './src/directive_normalizer'; import * as directive_normalizer from './src/directive_normalizer';
import * as lexer from './src/expression_parser/lexer'; import * as lexer from './src/expression_parser/lexer';
import * as parser from './src/expression_parser/parser'; 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 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 ng_module_compiler from './src/ng_module_compiler';
import * as path_util from './src/output/path_util'; import * as path_util from './src/output/path_util';
import * as ts_emitter from './src/output/ts_emitter'; import * as ts_emitter from './src/output/ts_emitter';

View File

@ -24,7 +24,7 @@ export {NgModuleResolver} from './ng_module_resolver';
import {stringify} from './facade/lang'; import {stringify} from './facade/lang';
import {ListWrapper} from './facade/collection'; import {ListWrapper} from './facade/collection';
import {TemplateParser} from './template_parser/template_parser'; 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 {DirectiveNormalizer} from './directive_normalizer';
import {CompileMetadataResolver} from './metadata_resolver'; import {CompileMetadataResolver} from './metadata_resolver';
import {StyleCompiler} from './style_compiler'; import {StyleCompiler} from './style_compiler';

View File

@ -13,9 +13,9 @@ import {CompilerConfig} from './config';
import {MapWrapper} from './facade/collection'; import {MapWrapper} from './facade/collection';
import {BaseException} from './facade/exceptions'; import {BaseException} from './facade/exceptions';
import {isBlank, isPresent} from './facade/lang'; import {isBlank, isPresent} from './facade/lang';
import * as html from './html_parser/ast'; import * as html from './ml_parser/ast';
import {HtmlParser} from './html_parser/html_parser'; import {HtmlParser} from './ml_parser/html_parser';
import {InterpolationConfig} from './html_parser/interpolation_config'; import {InterpolationConfig} from './ml_parser/interpolation_config';
import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver'; import {extractStyleUrls, isStyleUrlResolvable} from './style_url_resolver';
import {PreparsedElementType, preparseElement} from './template_parser/template_preparser'; import {PreparsedElementType, preparseElement} from './template_parser/template_preparser';
import {UrlResolver} from './url_resolver'; import {UrlResolver} from './url_resolver';

View File

@ -9,10 +9,8 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import * as chars from '../chars'; import * as chars from '../chars';
import {ListWrapper} from '../facade/collection';
import {BaseException} from '../facade/exceptions';
import {StringWrapper, escapeRegExp, isBlank, isPresent} from '../facade/lang'; 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 {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'; import {EOF, Lexer, Token, TokenType, isIdentifier, isQuote} from './lexer';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * 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'; import {I18nError} from './parse_util';
const _I18N_ATTR = 'i18n'; const _I18N_ATTR = 'i18n';

View File

@ -8,9 +8,9 @@
import {Lexer as ExpressionLexer} from '../expression_parser/lexer'; import {Lexer as ExpressionLexer} from '../expression_parser/lexer';
import {Parser as ExpressionParser} from '../expression_parser/parser'; import {Parser as ExpressionParser} from '../expression_parser/parser';
import * as html from '../html_parser/ast'; import * as html from '../ml_parser/ast';
import {getHtmlTagDefinition} from '../html_parser/html_tags'; import {getHtmlTagDefinition} from '../ml_parser/html_tags';
import {InterpolationConfig} from '../html_parser/interpolation_config'; import {InterpolationConfig} from '../ml_parser/interpolation_config';
import {ParseSourceSpan} from '../parse_util'; import {ParseSourceSpan} from '../parse_util';
import {extractAstMessages} from './extractor'; import {extractAstMessages} from './extractor';

View File

@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {HtmlParser} from '../html_parser/html_parser'; import {HtmlParser} from '../ml_parser/html_parser';
import {InterpolationConfig} from '../html_parser/interpolation_config'; import {InterpolationConfig} from '../ml_parser/interpolation_config';
import {ParseError} from '../parse_util'; import {ParseError} from '../parse_util';
import * as i18n from './i18n_ast'; import * as i18n from './i18n_ast';

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * 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'; import * as i18n from '../i18n_ast';
export interface Serializer { export interface Serializer {

View File

@ -7,7 +7,7 @@
*/ */
import {ListWrapper} from '../../facade/collection'; 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 * as i18n from '../i18n_ast';
import {Serializer} from './serializer'; import {Serializer} from './serializer';

View File

@ -6,10 +6,10 @@
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import * as xml from '../../html_parser/ast'; import * as ml from '../../ml_parser/ast';
import {HtmlParser} from '../../html_parser/html_parser'; import {HtmlParser} from '../../ml_parser/html_parser';
import {InterpolationConfig} from '../../html_parser/interpolation_config'; import {InterpolationConfig} from '../../ml_parser/interpolation_config';
import {XmlParser} from '../../html_parser/xml_parser'; import {XmlParser} from '../../ml_parser/xml_parser';
import {ParseError} from '../../parse_util'; import {ParseError} from '../../parse_util';
import * as i18n from '../i18n_ast'; import * as i18n from '../i18n_ast';
import {I18nError} from '../parse_util'; 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'); } write(messageMap: {[id: string]: i18n.Message}): string { throw new Error('Unsupported'); }
load(content: string, url: string, placeholders: {[id: string]: {[name: string]: string}}): 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 // Parse the xtb file into xml nodes
const result = new XmlParser().parse(content, url); const result = new XmlParser().parse(content, url);
@ -43,7 +43,7 @@ export class Xtb implements Serializer {
// Convert the string messages to html ast // Convert the string messages to html ast
// TODO(vicb): map error message back to the original message in xtb // 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[] = []; let parseErrors: ParseError[] = [];
Object.keys(messages).forEach((id) => { 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 _messages: {[id: string]: string};
private _bundleDepth: number; private _bundleDepth: number;
private _translationDepth: number; private _translationDepth: number;
@ -68,7 +68,7 @@ class _Serializer implements xml.Visitor {
private _placeholders: {[id: string]: {[name: string]: string}}; private _placeholders: {[id: string]: {[name: string]: string}};
private _currentPlaceholders: {[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[]} { {messages: {[k: string]: string}, errors: I18nError[]} {
this._messages = {}; this._messages = {};
this._bundleDepth = 0; this._bundleDepth = 0;
@ -76,19 +76,19 @@ class _Serializer implements xml.Visitor {
this._errors = []; this._errors = [];
this._placeholders = _placeholders; this._placeholders = _placeholders;
xml.visitAll(this, nodes, null); ml.visitAll(this, nodes, null);
return {messages: this._messages, errors: this._errors}; return {messages: this._messages, errors: this._errors};
} }
visitElement(element: xml.Element, context: any): any { visitElement(element: ml.Element, context: any): any {
switch (element.name) { switch (element.name) {
case _TRANSLATIONS_TAG: case _TRANSLATIONS_TAG:
this._bundleDepth++; this._bundleDepth++;
if (this._bundleDepth > 1) { if (this._bundleDepth > 1) {
this._addError(element, `<${_TRANSLATIONS_TAG}> elements can not be nested`); this._addError(element, `<${_TRANSLATIONS_TAG}> elements can not be nested`);
} }
xml.visitAll(this, element.children, null); ml.visitAll(this, element.children, null);
this._bundleDepth--; this._bundleDepth--;
break; break;
@ -102,7 +102,7 @@ class _Serializer implements xml.Visitor {
this._addError(element, `<${_TRANSLATION_TAG}> misses the "id" attribute`); this._addError(element, `<${_TRANSLATION_TAG}> misses the "id" attribute`);
} else { } else {
this._currentPlaceholders = this._placeholders[idAttr.value] || {}; 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--; this._translationDepth--;
break; 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'); 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)); const strCases = expansion.cases.map(c => c.visit(this, null));
return `{${expansion.switchValue}, ${expansion.type}, strCases.join(' ')}`; return `{${expansion.switchValue}, ${expansion.type}, strCases.join(' ')}`;
} }
visitExpansionCase(expansionCase: xml.ExpansionCase, context: any): any { visitExpansionCase(expansionCase: ml.ExpansionCase, context: any): any {
return `${expansionCase.value} {${xml.visitAll(this, expansionCase.expression, null)}}`; 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)); this._errors.push(new I18nError(node.sourceSpan, message));
} }
} }

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license * 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'; import {Serializer} from './serializers/serializer';

View File

@ -15,11 +15,11 @@ import {Parser} from '../expression_parser/parser';
import {ListWrapper, SetWrapper, StringMapWrapper} from '../facade/collection'; import {ListWrapper, SetWrapper, StringMapWrapper} from '../facade/collection';
import {BaseException} from '../facade/exceptions'; import {BaseException} from '../facade/exceptions';
import {isBlank, isPresent} from '../facade/lang'; import {isBlank, isPresent} from '../facade/lang';
import * as html from '../html_parser/ast'; import * as html from '../ml_parser/ast';
import {HtmlParser, ParseTreeResult} from '../html_parser/html_parser'; import {HtmlParser, ParseTreeResult} from '../ml_parser/html_parser';
import {expandNodes} from '../html_parser/icu_ast_expander'; import {expandNodes} from '../ml_parser/icu_ast_expander';
import {InterpolationConfig} from '../html_parser/interpolation_config'; import {InterpolationConfig} from '../ml_parser/interpolation_config';
import {mergeNsAndName, splitNsName} from '../html_parser/tags'; import {mergeNsAndName, splitNsName} from '../ml_parser/tags';
import {Identifiers, identifierToken} from '../identifiers'; import {Identifiers, identifierToken} from '../identifiers';
import {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util'; import {ParseError, ParseErrorLevel, ParseSourceSpan} from '../parse_util';
import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer'; import {ProviderElementContext, ProviderViewContext} from '../provider_analyzer';

View File

@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.io/license * 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 {splitNsName} from '../html_parser/tags'; import {splitNsName} from '../ml_parser/tags';
const NG_CONTENT_SELECT_ATTR = 'select'; const NG_CONTENT_SELECT_ATTR = 'select';
const NG_CONTENT_ELEMENT = 'ng-content'; const NG_CONTENT_ELEMENT = 'ng-content';

View File

@ -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 {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 {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 { class Unparser implements AstVisitor {
private static _quoteRegExp = /"/g; private static _quoteRegExp = /"/g;

View File

@ -9,7 +9,7 @@
import {ExtractionResult, extractAstMessages} from '@angular/compiler/src/i18n/extractor'; 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 {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'; import {serializeAst} from '../html_parser/ast_serializer_spec';
export function main() { export function main() {

View File

@ -10,9 +10,9 @@ import {Message} from '@angular/compiler/src/i18n/i18n_ast';
import {extractI18nMessages} from '@angular/compiler/src/i18n/i18n_parser'; import {extractI18nMessages} from '@angular/compiler/src/i18n/i18n_parser';
import {ddescribe, describe, expect, it} from '@angular/core/testing/testing_internal'; 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 {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() { export function main() {
describe('I18nParser', () => { describe('I18nParser', () => {

View File

@ -10,9 +10,9 @@ import * as i18n from '@angular/compiler/src/i18n/i18n_ast';
import {Serializer} from '@angular/compiler/src/i18n/serializers/serializer'; 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 {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 {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 { export function main(): void {
describe('MessageBundle', () => { describe('MessageBundle', () => {

View File

@ -9,9 +9,9 @@
import {Xmb} from '@angular/compiler/src/i18n/serializers/xmb'; 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 {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 {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 { export function main(): void {
describe('XMB serializer', () => { describe('XMB serializer', () => {

View File

@ -10,9 +10,9 @@ import {Xtb} from '@angular/compiler/src/i18n/serializers/xtb';
import {escapeRegExp} from '@angular/core/src/facade/lang'; 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 {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 {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/html_parser/interpolation_config'; import {DEFAULT_INTERPOLATION_CONFIG} from '../../../src/ml_parser/interpolation_config';
import {serializeAst} from '../../html_parser/ast_serializer_spec'; import {serializeAst} from '../../ml_parser/ast_serializer_spec';
export function main(): void { export function main(): void {
describe('XTB serializer', () => { describe('XTB serializer', () => {

View File

@ -7,8 +7,8 @@
*/ */
import {beforeEach, ddescribe, describe, expect, it} from '../../../core/testing/testing_internal'; import {beforeEach, ddescribe, describe, expect, it} from '../../../core/testing/testing_internal';
import * as html from '../../src/html_parser/ast'; import * as html from '../../src/ml_parser/ast';
import {HtmlParser} from '../../src/html_parser/html_parser'; import {HtmlParser} from '../../src/ml_parser/html_parser';
export function main() { export function main() {
describe('Node serilaizer', () => { describe('Node serilaizer', () => {

View File

@ -7,8 +7,8 @@
*/ */
import {BaseException} from '../../src/facade/exceptions'; import {BaseException} from '../../src/facade/exceptions';
import * as html from '../../src/html_parser/ast'; import * as html from '../../src/ml_parser/ast';
import {ParseTreeResult} from '../../src/html_parser/html_parser'; import {ParseTreeResult} from '../../src/ml_parser/html_parser';
import {ParseLocation} from '../../src/parse_util'; import {ParseLocation} from '../../src/parse_util';
export function humanizeDom(parseResult: ParseTreeResult, addSourceSpan: boolean = false): any[] { export function humanizeDom(parseResult: ParseTreeResult, addSourceSpan: boolean = false): any[] {

View File

@ -7,9 +7,9 @@
*/ */
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal'; import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
import * as html from '../../src/html_parser/ast'; import * as html from '../../src/ml_parser/ast';
import {HtmlParser, ParseTreeResult, TreeError} from '../../src/html_parser/html_parser'; import {HtmlParser, ParseTreeResult, TreeError} from '../../src/ml_parser/html_parser';
import {TokenType} from '../../src/html_parser/lexer'; import {TokenType} from '../../src/ml_parser/lexer';
import {ParseError} from '../../src/parse_util'; import {ParseError} from '../../src/parse_util';
import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './ast_spec_utils'; import {humanizeDom, humanizeDomSourceSpans, humanizeLineColumn} from './ast_spec_utils';

View File

@ -7,9 +7,9 @@
*/ */
import {ddescribe, describe, expect, iit, it} from '../../../core/testing/testing_internal'; import {ddescribe, describe, expect, iit, it} from '../../../core/testing/testing_internal';
import * as html from '../../src/html_parser/ast'; import * as html from '../../src/ml_parser/ast';
import {HtmlParser} from '../../src/html_parser/html_parser'; import {HtmlParser} from '../../src/ml_parser/html_parser';
import {ExpansionResult, expandNodes} from '../../src/html_parser/icu_ast_expander'; import {ExpansionResult, expandNodes} from '../../src/ml_parser/icu_ast_expander';
import {ParseError} from '../../src/parse_util'; import {ParseError} from '../../src/parse_util';
import {humanizeNodes} from './ast_spec_utils'; import {humanizeNodes} from './ast_spec_utils';

View File

@ -7,9 +7,9 @@
*/ */
import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal'; import {afterEach, beforeEach, ddescribe, describe, expect, iit, it, xit} from '../../../core/testing/testing_internal';
import {getHtmlTagDefinition} from '../../src/html_parser/html_tags'; import {getHtmlTagDefinition} from '../../src/ml_parser/html_tags';
import {InterpolationConfig} from '../../src/html_parser/interpolation_config'; import {InterpolationConfig} from '../../src/ml_parser/interpolation_config';
import * as lex from '../../src/html_parser/lexer'; import * as lex from '../../src/ml_parser/lexer';
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_util'; import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '../../src/parse_util';
export function main() { export function main() {

View File

@ -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 {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 {browserDetection} from '@angular/platform-browser/testing/browser_util';
import {Element} from '../../src/html_parser/ast'; import {Element} from '../../src/ml_parser/ast';
import {HtmlParser} from '../../src/html_parser/html_parser'; import {HtmlParser} from '../../src/ml_parser/html_parser';
import {extractSchema} from './schema_extractor'; import {extractSchema} from './schema_extractor';

View File

@ -17,8 +17,8 @@ import {Console} from '@angular/core/src/console';
import {TestBed} from '@angular/core/testing'; import {TestBed} from '@angular/core/testing';
import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xit} from '@angular/core/testing/testing_internal'; 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 {Identifiers, identifierToken} from '../../src/identifiers';
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '../../src/ml_parser/interpolation_config';
import {unparse} from '../expression_parser/unparser'; import {unparse} from '../expression_parser/unparser';
import {TEST_COMPILER_PROVIDERS} from '../test_bindings'; import {TEST_COMPILER_PROVIDERS} from '../test_bindings';

View File

@ -7,8 +7,8 @@
*/ */
import {afterEach, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '../../../core/testing/testing_internal'; 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 {Element} from '../../src/ml_parser/ast';
import {HtmlParser} from '../../src/html_parser/html_parser'; import {HtmlParser} from '../../src/ml_parser/html_parser';
import {PreparsedElement, PreparsedElementType, preparseElement} from '../../src/template_parser/template_preparser'; import {PreparsedElement, PreparsedElementType, preparseElement} from '../../src/template_parser/template_preparser';
export function main() { export function main() {