Moti Zilberman 9b6e243736 Raise error on duplicate definition of __proto__ (#183)
Spec: http://www.ecma-international.org/ecma-262/6.0/#sec-__proto__-property-names-in-object-initializers

This brings back to life a bit of dead code in Parser.prototype.checkPropClash, and enables several tests that were previously disabled.
2016-10-16 15:16:38 +02:00

170 lines
3.9 KiB
JSON

{
"type": "File",
"start": 0,
"end": 42,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
},
"program": {
"type": "Program",
"start": 0,
"end": 42,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 42,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
},
"expression": {
"type": "ObjectExpression",
"start": 1,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 41
}
},
"properties": [
{
"type": "Property",
"start": 3,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 20
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "StringLiteral",
"start": 3,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 14
}
},
"value": "__proto__",
"rawValue": "__proto__",
"raw": "\"__proto__\""
},
"value": {
"type": "NullLiteral",
"start": 16,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 20
}
}
},
"kind": "init"
},
{
"type": "Property",
"start": 22,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 39
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "StringLiteral",
"start": 22,
"end": 33,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 33
}
},
"value": "__proto__",
"rawValue": "__proto__",
"raw": "'__proto__'"
},
"value": {
"type": "NullLiteral",
"start": 35,
"end": 39,
"loc": {
"start": {
"line": 1,
"column": 35
},
"end": {
"line": 1,
"column": 39
}
}
},
"kind": "init"
}
],
"parenthesizedExpression": true
}
}
]
}
}