* 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.
50 lines
1.7 KiB
JSON
50 lines
1.7 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
|
|
"errors": [
|
|
"SyntaxError: Missing semicolon. (1:15)",
|
|
"SyntaxError: Unexpected reserved word 'package'. (1:16)"
|
|
],
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":23,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":23}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":14,"end":15,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":15}},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"start":14,"end":15,"loc":{"start":{"line":1,"column":14},"end":{"line":1,"column":15},"identifierName":"a"},
|
|
"name": "a"
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":16,"end":23,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":23}},
|
|
"expression": {
|
|
"type": "Identifier",
|
|
"start":16,"end":23,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":23},"identifierName":"package"},
|
|
"name": "package"
|
|
}
|
|
}
|
|
],
|
|
"directives": [
|
|
{
|
|
"type": "Directive",
|
|
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}},
|
|
"value": {
|
|
"type": "DirectiveLiteral",
|
|
"start":0,"end":12,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":12}},
|
|
"extra": {
|
|
"rawValue": "use strict",
|
|
"raw": "'use strict'",
|
|
"expressionValue": "use strict"
|
|
},
|
|
"value": "use strict"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
} |