Skip to content

Commit

Permalink
feat(Compiler): case sensitive html parser
Browse files Browse the repository at this point in the history
  • Loading branch information
tbosch authored and vicb committed Nov 14, 2015
1 parent 6d70cd7 commit 7e66fb8
Show file tree
Hide file tree
Showing 14 changed files with 1,673 additions and 669 deletions.
10 changes: 6 additions & 4 deletions modules/angular2/src/compiler/html_ast.ts
@@ -1,23 +1,25 @@
import {isPresent} from 'angular2/src/facade/lang';

import {ParseSourceSpan} from './parse_util';

export interface HtmlAst {
sourceInfo: string;
sourceSpan: ParseSourceSpan;
visit(visitor: HtmlAstVisitor, context: any): any;
}

export class HtmlTextAst implements HtmlAst {
constructor(public value: string, public sourceInfo: string) {}
constructor(public value: string, public sourceSpan: ParseSourceSpan) {}
visit(visitor: HtmlAstVisitor, context: any): any { return visitor.visitText(this, context); }
}

export class HtmlAttrAst implements HtmlAst {
constructor(public name: string, public value: string, public sourceInfo: string) {}
constructor(public name: string, public value: string, public sourceSpan: ParseSourceSpan) {}
visit(visitor: HtmlAstVisitor, context: any): any { return visitor.visitAttr(this, context); }
}

export class HtmlElementAst implements HtmlAst {
constructor(public name: string, public attrs: HtmlAttrAst[], public children: HtmlAst[],
public sourceInfo: string) {}
public sourceSpan: ParseSourceSpan) {}
visit(visitor: HtmlAstVisitor, context: any): any { return visitor.visitElement(this, context); }
}

Expand Down

0 comments on commit 7e66fb8

Please sign in to comment.