adding paren wrappers for property accesses directly on object literals

This commit is contained in:
Jeremy Ashkenas
2010-02-15 19:13:08 -05:00
parent 639be2ff09
commit 63c2b2bc64
3 changed files with 7 additions and 0 deletions

View File

@@ -320,6 +320,9 @@
only = del(o, 'only_first');
props = only ? this.properties.slice(0, this.properties.length - 1) : this.properties;
baseline = this.base.compile(o);
if (this.base instanceof ObjectNode && this.has_properties()) {
baseline = '(' + baseline + ')';
}
parts = [baseline];
__a = props;
for (__b = 0; __b < __a.length; __b++) {