* 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.
63 lines
2.1 KiB
JSON
63 lines
2.1 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":39,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},
|
|
"errors": [
|
|
"SyntaxError: Legacy octal literals are not allowed in strict mode. (1:33)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":39,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start":0,"end":39,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},
|
|
"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":39,"loc":{"start":{"line":1,"column":17},"end":{"line":1,"column":39}},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":33,"end":37,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":37}},
|
|
"expression": {
|
|
"type": "NumericLiteral",
|
|
"start":33,"end":36,"loc":{"start":{"line":1,"column":33},"end":{"line":1,"column":36}},
|
|
"extra": {
|
|
"rawValue": 17,
|
|
"raw": "021"
|
|
},
|
|
"value": 17
|
|
}
|
|
}
|
|
],
|
|
"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": []
|
|
}
|
|
} |