swc/ecmascript/parser/tests/jsx/basic/7/input.js.json

203 lines
4.3 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 0,
"end": 55,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 10
}
}
},
"body": [
{
"type": "JSXElement",
"span": {
"start": 0,
"end": 55,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 10
}
}
},
"opening": {
"type": "JSXOpeningElement",
"name": {
"type": "Identifier",
"span": {
"start": 1,
"end": 8,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 8
}
}
},
"value": "AbC-def",
"typeAnnotation": null,
"optional": false
},
"span": {
"start": 1,
"end": 33,
"ctxt": 0,
"loc": {
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 2,
"column": 23
}
}
},
"attributes": [
{
"type": "JSXAttribute",
"span": {
"start": 12,
"end": 32,
"ctxt": 0,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 22
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 12,
"end": 16,
"ctxt": 0,
"loc": {
"start": {
"line": 2,
"column": 2
},
"end": {
"line": 2,
"column": 6
}
}
},
"value": "test",
"typeAnnotation": null,
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 17,
"end": 32,
"ctxt": 0,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 22
}
}
},
"value": "&&",
"hasEscape": false
}
}
],
"selfClosing": false,
"typeArguments": null
},
"children": [
{
"type": "JSXText",
"span": {
"start": 33,
"end": 45,
"ctxt": 0,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 5,
"column": 0
}
}
},
"value": "\n\r\nbar\n\r\nbaz\n\r\n",
"raw": "\n\r\nbar\n\r\nbaz\n\r\n"
}
],
"closing": {
"type": "JSXClosingElement",
"span": {
"start": 47,
"end": 55,
"ctxt": 0,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 10
}
}
},
"name": {
"type": "Identifier",
"span": {
"start": 47,
"end": 54,
"ctxt": 0,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 9
}
}
},
"value": "AbC-def",
"typeAnnotation": null,
"optional": false
}
}
}
],
"interpreter": null
}