From 013e48439fab0c14e4a4286e5f2b78258237ac6f Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Thu, 5 Mar 2015 11:15:04 +0100 Subject: [PATCH] Update tools/generate-identifier-regex.js So that it can also spit out the astral maps. --- src/expression.js | 2 +- test/tests-harmony.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/expression.js b/src/expression.js index fe186f68b1..8419d9ebb2 100644 --- a/src/expression.js +++ b/src/expression.js @@ -491,7 +491,7 @@ pp.parsePropertyName = function(prop) { if (this.options.ecmaVersion >= 6) { if (this.eat(tt.bracketL)) { prop.computed = true - prop.key = this.parseExpression() + prop.key = this.parseMaybeAssign() this.expect(tt.bracketR) return } else { diff --git a/test/tests-harmony.js b/test/tests-harmony.js index e536094291..71b9be9c08 100644 --- a/test/tests-harmony.js +++ b/test/tests-harmony.js @@ -14051,6 +14051,8 @@ testFail("yield v", "Unexpected token (1:6)", {ecmaVersion: 6}); testFail("yield 10", "Unexpected token (1:6)", {ecmaVersion: 6}); +testFail("void { [1, 2]: 3 };", "Unexpected token (1:9)", {ecmaVersion: 6}); + test("yield* 10", { type: "Program", body: [{