Francisco Ryan Tolmasky I 966387d263
Always expose expressionValue in DirectiveLiteral nodes (#13960)
* 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.
2021-11-13 20:46:16 -05:00

65 lines
2.0 KiB
JSON

{
"type": "File",
"start":0,"end":34,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":34}},
"program": {
"type": "Program",
"start":0,"end":34,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":34}},
"sourceType": "script",
"interpreter": null,
"body": [],
"directives": [
{
"type": "Directive",
"start":7,"end":27,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":27}},
"value": {
"type": "DirectiveLiteral",
"start":7,"end":19,"loc":{"start":{"line":1,"column":7},"end":{"line":1,"column":19}},
"extra": {
"rawValue": "use strict",
"raw": "\"use strict\"",
"expressionValue": "use strict"
},
"value": "use strict",
"trailingComments": [
{
"type": "CommentBlock",
"value": " 2 ",
"start":19,"end":26,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":26}}
}
]
},
"trailingComments": [
{
"type": "CommentBlock",
"value": " 3 ",
"start":27,"end":34,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":34}}
}
],
"leadingComments": [
{
"type": "CommentBlock",
"value": " 1 ",
"start":0,"end":7,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":7}}
}
]
}
]
},
"comments": [
{
"type": "CommentBlock",
"value": " 1 ",
"start":0,"end":7,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":7}}
},
{
"type": "CommentBlock",
"value": " 2 ",
"start":19,"end":26,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":26}}
},
{
"type": "CommentBlock",
"value": " 3 ",
"start":27,"end":34,"loc":{"start":{"line":1,"column":27},"end":{"line":1,"column":34}}
}
]
}