* 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.
89 lines
3.2 KiB
JSON
89 lines
3.2 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},
|
|
"errors": [
|
|
"SyntaxError: Legacy octal literals are not allowed in strict mode. (1:36)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":49,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},
|
|
"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":49,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":49}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":33,"end":47,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":47}},
|
|
"expression": {
|
|
"type": "ObjectExpression",
|
|
"start":34,"end":45,"loc":{"start":{"line":1,"column":34},"end":{"line":1,"column":45}},
|
|
"properties": [
|
|
{
|
|
"type": "ObjectProperty",
|
|
"start":36,"end":43,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":43}},
|
|
"method": false,
|
|
"key": {
|
|
"type": "NumericLiteral",
|
|
"start":36,"end":39,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":39}},
|
|
"extra": {
|
|
"rawValue": 17,
|
|
"raw": "021"
|
|
},
|
|
"value": 17
|
|
},
|
|
"computed": false,
|
|
"shorthand": false,
|
|
"value": {
|
|
"type": "NumericLiteral",
|
|
"start":41,"end":43,"loc":{"start":{"line":1,"column":41},"end":{"line":1,"column":43}},
|
|
"extra": {
|
|
"rawValue": 42,
|
|
"raw": "42"
|
|
},
|
|
"value": 42
|
|
}
|
|
}
|
|
],
|
|
"extra": {
|
|
"parenthesized": true,
|
|
"parenStart": 33
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": [
|
|
{
|
|
"type": "Directive",
|
|
"start":19,"end":32,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":32}},
|
|
"value": {
|
|
"type": "DirectiveLiteral",
|
|
"start":19,"end":31,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":31}},
|
|
"extra": {
|
|
"rawValue": "use strict",
|
|
"raw": "'use strict'",
|
|
"expressionValue": "use strict"
|
|
},
|
|
"value": "use strict"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
} |