Revert "Disallow parentheses in lvalue except as in computed keys or default values."

This reverts commit 85087f2a09.
Fixes #193.
This commit is contained in:
Ingvar Stepanyan
2015-01-12 20:31:38 +02:00
parent bc2e01aa03
commit d1f95ece42
3 changed files with 11 additions and 20 deletions

View File

@@ -403,7 +403,7 @@ test("(1 + 2 ) * 3", {
preserveParens: true
});
testFail("(x) = 23", "Assigning to rvalue (1:4)");
testFail("(x) = 23", "Assigning to rvalue (1:0)", { preserveParens: true });
test("x = []", {
type: "Program",
@@ -26883,7 +26883,7 @@ testFail("func() = 4",
"Assigning to rvalue (1:0)");
testFail("(1 + 1) = 10",
"Assigning to rvalue (1:8)");
"Assigning to rvalue (1:1)");
testFail("1++",
"Assigning to rvalue (1:0)");