Don't complain about reserved words in property name position

Also add forbidReserved: "everywhere" support.

Issue #85
This commit is contained in:
Marijn Haverbeke
2014-02-14 11:27:48 +01:00
parent 716ade22fb
commit 5bd50cce6f
4 changed files with 74 additions and 19 deletions

View File

@@ -26348,6 +26348,39 @@ test("x = y-->10;\n --> nothing", {
]
});
test("'use strict';\nobject.static();", {
type: "Program",
body: [
{
type: "ExpressionStatement",
expression: {
type: "Literal",
value: "use strict",
raw: "'use strict'"
}
},
{
type: "ExpressionStatement",
expression: {
type: "CallExpression",
callee: {
type: "MemberExpression",
object: {
type: "Identifier",
name: "object"
},
property: {
type: "Identifier",
name: "static"
},
computed: false
},
arguments: []
}
}
]
});
// Failure tests
testFail("{",