mirror of
https://github.com/swc-project/swc.git
synced 2024-12-30 00:52:29 +03:00
b44da9dbe4
swc_common: - don't emit `loc` for dummy spans swc_ecma_transforms: - prevent hygiene from changing key in object pattern (#369) - fix module tests (iteration order of FxHashSet is changed) swc_ecma_parser: - fix parsing of arrow function (#370)
237 lines
5.1 KiB
JSON
237 lines
5.1 KiB
JSON
{
|
|
"type": "Module",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 59,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 59
|
|
}
|
|
}
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "JSXFragment",
|
|
"span": {
|
|
"start": 0,
|
|
"end": 59,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 59
|
|
}
|
|
}
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningFragment",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 2,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 1
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 2
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXElement",
|
|
"span": {
|
|
"start": 2,
|
|
"end": 23,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 2
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 23
|
|
}
|
|
}
|
|
},
|
|
"opening": {
|
|
"type": "JSXOpeningElement",
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 3,
|
|
"end": 6,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 3
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 6
|
|
}
|
|
}
|
|
},
|
|
"value": "div",
|
|
"optional": false
|
|
},
|
|
"span": {
|
|
"start": 3,
|
|
"end": 7,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 3
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 7
|
|
}
|
|
}
|
|
},
|
|
"selfClosing": false
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 7,
|
|
"end": 17,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 7
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 17
|
|
}
|
|
}
|
|
},
|
|
"value": "JSXElement",
|
|
"raw": "JSXElement"
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingElement",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 23,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 19
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 23
|
|
}
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 19,
|
|
"end": 22,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 19
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 22
|
|
}
|
|
}
|
|
},
|
|
"value": "div",
|
|
"optional": false
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "JSXText",
|
|
"span": {
|
|
"start": 23,
|
|
"end": 30,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 23
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 30
|
|
}
|
|
}
|
|
},
|
|
"value": "JSXText",
|
|
"raw": "JSXText"
|
|
},
|
|
{
|
|
"type": "JSXExpressionContainer",
|
|
"expression": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 55,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 31
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 55
|
|
}
|
|
}
|
|
},
|
|
"value": "JSXExpressionContainer",
|
|
"hasEscape": false
|
|
}
|
|
}
|
|
],
|
|
"closing": {
|
|
"type": "JSXClosingFragment",
|
|
"span": {
|
|
"start": 58,
|
|
"end": 59,
|
|
"ctxt": 0,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 58
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 59
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|