feat(compiler): pass compilation unit to the parser

This commit is contained in:
vsavkin
2014-12-10 19:21:15 -08:00
parent d985045983
commit d5fcac4d7a
17 changed files with 109 additions and 72 deletions

View File

@ -20,7 +20,7 @@ import {Record} from 'change_detection/record';
export function main() {
function ast(exp:string) {
var parser = new Parser(new Lexer());
return parser.parseBinding(exp);
return parser.parseBinding(exp, 'location');
}
function createChangeDetector(memo:string, exp:string, context = null, formatters = null,
@ -451,7 +451,7 @@ export function main() {
expect(() => {
var cd = new ChangeDetector(rr, true);
cd.detectChanges();
}).toThrowError(new RegExp("Expression 'a' has changed after it was checked"));
}).toThrowError(new RegExp("Expression 'a in location' has changed after it was checked"));
});
});
});