cleanup(html_parser): cleanup to fix analyzer warnings

This commit is contained in:
vsavkin 2016-04-12 12:03:38 -07:00 committed by Victor Savkin
parent 88b0a239c4
commit 22ae2d0976
2 changed files with 3 additions and 2 deletions

View File

@ -150,7 +150,7 @@ class TreeBuilder {
// parse everything in between { and }
let parsedExp = new TreeBuilder(exp).build();
if (parsedExp.errors.length > 0) {
this.errors = this.errors.concat(parsedExp.errors);
this.errors = this.errors.concat(<HtmlTreeError[]>parsedExp.errors);
return;
}

View File

@ -88,7 +88,8 @@ export class LegacyHtmlAstTransformer implements HtmlAstVisitor {
visitExpansion(ast: HtmlExpansionAst, context: any): any {
let cases = ast.cases.map(c => c.visit(this, null));
return new HtmlExpansionAst(ast.switchValue, ast.type, cases, ast.sourceSpan);
return new HtmlExpansionAst(ast.switchValue, ast.type, cases, ast.sourceSpan,
ast.switchValueSourceSpan);
}
visitExpansionCase(ast: HtmlExpansionCaseAst, context: any): any { return ast; }