|
1 | 1 | import {isPresent} from 'angular2/src/facade/lang'; |
2 | 2 |
|
| 3 | +import {ParseSourceSpan} from './parse_util'; |
| 4 | + |
3 | 5 | export interface HtmlAst { |
4 | | - sourceInfo: string; |
| 6 | + sourceSpan: ParseSourceSpan; |
5 | 7 | visit(visitor: HtmlAstVisitor, context: any): any; |
6 | 8 | } |
7 | 9 |
|
8 | 10 | export class HtmlTextAst implements HtmlAst { |
9 | | - constructor(public value: string, public sourceInfo: string) {} |
| 11 | + constructor(public value: string, public sourceSpan: ParseSourceSpan) {} |
10 | 12 | visit(visitor: HtmlAstVisitor, context: any): any { return visitor.visitText(this, context); } |
11 | 13 | } |
12 | 14 |
|
13 | 15 | export class HtmlAttrAst implements HtmlAst { |
14 | | - constructor(public name: string, public value: string, public sourceInfo: string) {} |
| 16 | + constructor(public name: string, public value: string, public sourceSpan: ParseSourceSpan) {} |
15 | 17 | visit(visitor: HtmlAstVisitor, context: any): any { return visitor.visitAttr(this, context); } |
16 | 18 | } |
17 | 19 |
|
18 | 20 | export class HtmlElementAst implements HtmlAst { |
19 | 21 | constructor(public name: string, public attrs: HtmlAttrAst[], public children: HtmlAst[], |
20 | | - public sourceInfo: string) {} |
| 22 | + public sourceSpan: ParseSourceSpan) {} |
21 | 23 | visit(visitor: HtmlAstVisitor, context: any): any { return visitor.visitElement(this, context); } |
22 | 24 | } |
23 | 25 |
|
|
0 commit comments