swc/ecmascript/parser/tests/jsx/basic/2/input.js.json
강동윤 b44da9dbe4
Fix #369, #370 (#373)
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)
2019-04-27 16:28:34 +09:00

166 lines
3.6 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 11,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 11
}
}
},
"body": [
{
"type": "JSXElement",
"span": {
"start": 0,
"end": 11,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 11
}
}
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXNamespacedName",
"namespace": {
"type": "Identifier",
"span": {
"start": 1,
"end": 2,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 2
}
}
},
"value": "n",
"optional": false
},
"name": {
"type": "Identifier",
"span": {
"start": 3,
"end": 4,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 4
}
}
},
"value": "a",
"optional": false
}
},
"span": {
"start": 1,
"end": 11,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 11
}
}
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 5,
"end": 8,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 8
}
}
},
"name": {
"type": "JSXNamespacedName",
"namespace": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 6
}
}
},
"value": "n",
"optional": false
},
"name": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
}
},
"value": "v",
"optional": false
}
}
}
],
"selfClosing": true
},
"children": [],
"closing": null
}
]
}