refactor(Parser): cleanup

This commit is contained in:
vsavkin
2014-11-05 17:10:37 -08:00
parent 7b777b1f71
commit 693489ce38
5 changed files with 64 additions and 21 deletions

View File

@ -1,7 +1,7 @@
import {describe, it, xit, expect} from 'test_lib/test_lib';
import {List, ListWrapper} from 'facade/collection';
import {ImplicitReceiver, FieldRead} from 'change_detection/parser/ast';
import {ImplicitReceiver, AccessMember} from 'change_detection/parser/ast';
import {ClosureMap} from 'change_detection/parser/closure_map';
import {
@ -19,7 +19,7 @@ export function main() {
var parts = exp.split(".");
var cm = new ClosureMap();
return ListWrapper.reduce(parts, function (ast, fieldName) {
return new FieldRead(ast, fieldName, cm.getter(fieldName), cm.setter(fieldName));
return new AccessMember(ast, fieldName, cm.getter(fieldName), cm.setter(fieldName));
}, new ImplicitReceiver());
}