feat(parser): adds basic expressions to the parser.

Mostly copy pasta from angular.dart.

Remove GetterFactory in favor for ClosureMap (which has basically the same
implementation).
This commit is contained in:
Rado Kirov
2014-10-30 23:47:22 -07:00
parent 8c566dcfb5
commit 965fa1a985
11 changed files with 366 additions and 45 deletions

View File

@ -1,6 +1,6 @@
import {ProtoWatchGroup, WatchGroup} from './watch_group';
import {FIELD} from 'facade/lang';
import {FieldGetterFactory} from './facade';
import {ClosureMap} from 'change_detection/parser/closure_map';
/**
* For now we are dropping expression coalescence. We can always add it later, but
@ -134,8 +134,8 @@ export class Record {
setContext(context) {
this.mode = MODE_STATE_PROPERTY;
this.context = context;
var factory = new FieldGetterFactory();
this.getter = factory.getter(context, this.protoRecord.fieldName);
var closureMap = new ClosureMap();
this.getter = closureMap.getter(this.protoRecord.fieldName);
}
}