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

206 lines
4.9 KiB
JSON

{
"type": "File",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"program": {
"type": "Program",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 0,
"end": 1,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 1
}
},
"name": "x"
},
"right": {
"type": "ObjectExpression",
"start": 4,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 36
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 6,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 19
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 6,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 15
}
},
"name": "__proto__"
},
"value": {
"type": "NumericLiteral",
"start": 17,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 19
}
},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
}
},
{
"type": "ObjectProperty",
"start": 21,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 34
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 21,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 30
}
},
"name": "__proto__"
},
"value": {
"type": "NumericLiteral",
"start": 32,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 32
},
"end": {
"line": 1,
"column": 34
}
},
"extra": {
"rawValue": 43,
"raw": "43"
},
"value": 43
}
}
]
}
}
}
],
"directives": []
}
}