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

@ -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;

View File

@ -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() {

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 {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', () => {

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 {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', () => {

View File

@ -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', () => {

View File

@ -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', () => {

View File

@ -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', () => {

View File

@ -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[] {

View File

@ -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';

View File

@ -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';

View File

@ -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() {

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 {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';

View File

@ -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';

View File

@ -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() {