mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
217 lines
6.6 KiB
JSON
217 lines
6.6 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":4,"index":33}},
|
|
"program": {
|
|
"type": "Program",
|
|
"start":0,"end":33,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":4,"index":33}},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":0,"end":28,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":28,"index":28}},
|
|
"expression": {
|
|
"type": "TemplateLiteral",
|
|
"start":0,"end":27,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":27,"index":27}},
|
|
"expressions": [
|
|
{
|
|
"type": "Identifier",
|
|
"start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"x"},
|
|
"name": "x"
|
|
},
|
|
{
|
|
"type": "Identifier",
|
|
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20},"identifierName":"y"},
|
|
"name": "y"
|
|
}
|
|
],
|
|
"quasis": [
|
|
{
|
|
"type": "TemplateElement",
|
|
"start":1,"end":7,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":7,"index":7}},
|
|
"value": {
|
|
"raw": "before",
|
|
"cooked": "before"
|
|
},
|
|
"tail": false
|
|
},
|
|
{
|
|
"type": "TemplateElement",
|
|
"start":11,"end":17,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":1,"column":17,"index":17}},
|
|
"value": {
|
|
"raw": "middle",
|
|
"cooked": "middle"
|
|
},
|
|
"tail": false
|
|
},
|
|
{
|
|
"type": "TemplateElement",
|
|
"start":21,"end":26,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":26,"index":26}},
|
|
"value": {
|
|
"raw": "after",
|
|
"cooked": "after"
|
|
},
|
|
"tail": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start":29,"end":33,"loc":{"start":{"line":2,"column":0,"index":29},"end":{"line":2,"column":4,"index":33}},
|
|
"expression": {
|
|
"type": "TemplateLiteral",
|
|
"start":29,"end":32,"loc":{"start":{"line":2,"column":0,"index":29},"end":{"line":2,"column":3,"index":32}},
|
|
"expressions": [],
|
|
"quasis": [
|
|
{
|
|
"type": "TemplateElement",
|
|
"start":30,"end":31,"loc":{"start":{"line":2,"column":1,"index":30},"end":{"line":2,"column":2,"index":31}},
|
|
"value": {
|
|
"raw": "x",
|
|
"cooked": "x"
|
|
},
|
|
"tail": true
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
},
|
|
"tokens": [
|
|
{
|
|
"type": {
|
|
"label": "...${",
|
|
"beforeExpr": true,
|
|
"startsExpr": true,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"value": "`before${",
|
|
"start":0,"end":9,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":9,"index":9}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": "name",
|
|
"beforeExpr": false,
|
|
"startsExpr": true,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"value": "x",
|
|
"start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": "...${",
|
|
"beforeExpr": true,
|
|
"startsExpr": true,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"value": "}middle${",
|
|
"start":10,"end":19,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":19,"index":19}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": "name",
|
|
"beforeExpr": false,
|
|
"startsExpr": true,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"value": "y",
|
|
"start":19,"end":20,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":20,"index":20}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": "...`",
|
|
"beforeExpr": false,
|
|
"startsExpr": true,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"value": "}after`",
|
|
"start":20,"end":27,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":27,"index":27}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": ";",
|
|
"beforeExpr": true,
|
|
"startsExpr": false,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"start":27,"end":28,"loc":{"start":{"line":1,"column":27,"index":27},"end":{"line":1,"column":28,"index":28}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": "...`",
|
|
"beforeExpr": false,
|
|
"startsExpr": true,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"value": "`x`",
|
|
"start":29,"end":32,"loc":{"start":{"line":2,"column":0,"index":29},"end":{"line":2,"column":3,"index":32}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": ";",
|
|
"beforeExpr": true,
|
|
"startsExpr": false,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"start":32,"end":33,"loc":{"start":{"line":2,"column":3,"index":32},"end":{"line":2,"column":4,"index":33}}
|
|
},
|
|
{
|
|
"type": {
|
|
"label": "eof",
|
|
"beforeExpr": false,
|
|
"startsExpr": false,
|
|
"rightAssociative": false,
|
|
"isLoop": false,
|
|
"isAssign": false,
|
|
"prefix": false,
|
|
"postfix": false,
|
|
"binop": null
|
|
},
|
|
"start":33,"end":33,"loc":{"start":{"line":2,"column":4,"index":33},"end":{"line":2,"column":4,"index":33}}
|
|
}
|
|
]
|
|
}
|