swc/ecmascript/parser/tests/jsx/basic/21/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

247 lines
5.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 41,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 41
}
}
},
"body": [
{
"type": "JSXElement",
"span": {
"start": 0,
"end": 41,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 41
}
}
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 4,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 4
}
}
},
"value": "div",
"optional": false
},
"span": {
"start": 1,
"end": 12,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 12
}
}
},
"attributes": [
{
"type": "SpreadElement",
"spread": {
"start": 6,
"end": 9,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 9
}
}
},
"arguments": {
"type": "Identifier",
"span": {
"start": 9,
"end": 10,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 10
}
}
},
"value": "c",
"optional": false
}
}
],
"selfClosing": false
},
"children": [
{
"type": "JSXText",
"span": {
"start": 12,
"end": 13,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 13
}
}
},
"value": " ",
"raw": " "
},
{
"type": "JSXSpreadChild",
"expression": {
"type": "Identifier",
"span": {
"start": 17,
"end": 25,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 25
}
}
},
"value": "children",
"optional": false
}
},
{
"type": "JSXExpressionContainer",
"expression": {
"type": "Identifier",
"span": {
"start": 27,
"end": 28,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
}
}
},
"value": "a",
"optional": false
}
},
{
"type": "JSXSpreadChild",
"expression": {
"type": "Identifier",
"span": {
"start": 33,
"end": 34,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 33
},
"end": {
"line": 1,
"column": 34
}
}
},
"value": "b",
"optional": false
}
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 37,
"end": 41,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 41
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 37,
"end": 40,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 37
},
"end": {
"line": 1,
"column": 40
}
}
},
"value": "div",
"optional": false
}
}
}
]
}