* fix(babel-parser): Move storage of expressionValue in DirectiveLiteral to main parser so it is accessible to others. Closes #13953. Reviewed by @tolmasky. * Add results from running `OVERWRITE=true yarn jest babel-parser`. Reviewed by @tolmasky.
92 lines
3.4 KiB
JSON
92 lines
3.4 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":56,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},
|
|
"errors": [
|
|
"SyntaxError: Binding 'eval' in strict mode. (1:41)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":56,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":56,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start":9,"end":14,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":14},"identifierName":"hello"},
|
|
"name": "hello"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":17,"end":56,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":56}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":32,"end":54,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":54}},
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"start":33,"end":52,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":52}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectMethod",
|
|
"start":35,"end":50,"loc":{"start":{"line":1,"column":35},"end":{"line":1,"column":50}},
|
|
"method": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start":39,"end":40,"loc":{"start":{"line":1,"column":39},"end":{"line":1,"column":40},"identifierName":"s"},
|
|
"name": "s"
|
|
},
|
|
"computed": false,
|
|
"kind": "set",
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"start":41,"end":45,"loc":{"start":{"line":1,"column":41},"end":{"line":1,"column":45},"identifierName":"eval"},
|
|
"name": "eval"
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":47,"end":50,"loc":{"start":{"line":1,"column":47},"end":{"line":1,"column":50}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"extra": {
|
|
"parenthesized": true,
|
|
"parenStart": 32
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": [
|
|
{
|
|
"type": "Directive",
|
|
"start":18,"end":31,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":31}},
|
|
"value": {
|
|
"type": "DirectiveLiteral",
|
|
"start":18,"end":30,"loc":{"start":{"line":1,"column":18},"end":{"line":1,"column":30}},
|
|
"extra": {
|
|
"rawValue": "use strict",
|
|
"raw": "'use strict'",
|
|
"expressionValue": "use strict"
|
|
},
|
|
"value": "use strict"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |