Destructuring vardef in for..of and for..in

This commit is contained in:
Fábio Santos
2015-08-14 02:11:38 +01:00
committed by Richard van Velzen
parent e99bc914ca
commit d4f17f29ae
2 changed files with 10 additions and 1 deletions

View File

@@ -1187,7 +1187,7 @@ function parse($TEXT, options) {
def = new AST_VarDef({
start: S.token,
name: destructuring_(sym_type),
value: (expect_token("operator", "="), expression(false, no_in)),
value: is("operator", "=") ? (expect_token("operator", "="), expression(false, no_in)) : null,
end: prev()
});
} else {