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

314 lines
7.2 KiB
JSON

{
"type": "Module",
"span": {
"start": 0,
"end": 40,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
}
},
"body": [
{
"type": "JSXElement",
"span": {
"start": 0,
"end": 40,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 40
}
}
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 2,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 2
}
}
},
"value": "a",
"optional": false
},
"span": {
"start": 1,
"end": 40,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 40
}
}
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 3,
"end": 10,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 10
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 3,
"end": 4,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 3
},
"end": {
"line": 1,
"column": 4
}
}
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 6,
"end": 9,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 9
}
}
},
"value": " ",
"hasEscape": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 11,
"end": 16,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 16
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 11,
"end": 12,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 12
}
}
},
"value": "c",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 13,
"end": 16,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 13
},
"end": {
"line": 1,
"column": 16
}
}
},
"value": " ",
"hasEscape": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 17,
"end": 26,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 26
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 18
}
}
},
"value": "d",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 19,
"end": 26,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 26
}
}
},
"value": "&",
"hasEscape": false
}
},
{
"type": "JSXAttribute",
"span": {
"start": 27,
"end": 37,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 37
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 27,
"end": 28,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 28
}
}
},
"value": "e",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 29,
"end": 37,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 37
}
}
},
"value": "&ampr;",
"hasEscape": false
}
}
],
"selfClosing": true
},
"children": [],
"closing": null
}
]
}