implement object rest/spread (#2265)

- improve parse errors for destructuring spread elements
- `unsafe` for object literals with rest elements

Miscellaneous
- increase mocha unicode surrogate test timeout
This commit is contained in:
kzc
2017-08-02 01:47:58 -04:00
committed by Alex Lam S.L
parent f54ab16843
commit 4700c14855
5 changed files with 117 additions and 16 deletions

View File

@@ -1731,6 +1731,7 @@ merge(Compressor.prototype, {
var val = {};
for (var i = 0, len = this.properties.length; i < len; i++) {
var prop = this.properties[i];
if (prop instanceof AST_Expansion) return this;
var key = prop.key;
if (key instanceof AST_Symbol) {
key = key.name;