swc/crates/swc_html_parser/tests/fixture/document/output.json

732 lines
12 KiB
JSON
Raw Normal View History

2022-04-04 07:12:45 +03:00
{
"type": "Document",
"span": {
"start": 0,
"end": 102,
"ctxt": 0
},
"children": [
{
"type": "TokenAndSpan",
"span": {
"start": 0,
"end": 15,
"ctxt": 0
},
"token": {
"Doctype": {
"name": "html",
"force_quirks": false,
"public_id": null,
"system_id": null
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 16,
"end": 22,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "html",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 22,
"end": 23,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 23,
"end": 29,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "body",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 29,
"end": 30,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 31,
"end": 35,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "h1",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"token": {
"Character": {
"value": "M"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"token": {
"Character": {
"value": "y"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"token": {
"Character": {
"value": "F"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 39,
"end": 40,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 40,
"end": 41,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"token": {
"Character": {
"value": "t"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"token": {
"Character": {
"value": "H"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"token": {
"Character": {
"value": "e"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"token": {
"Character": {
"value": "d"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"token": {
"Character": {
"value": "n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 51,
"end": 56,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "h1",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 56,
"end": 57,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 58,
"end": 61,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "p",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 61,
"end": 62,
"ctxt": 0
},
"token": {
"Character": {
"value": "M"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"token": {
"Character": {
"value": "y"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 64,
"end": 65,
"ctxt": 0
},
"token": {
"Character": {
"value": "f"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 66,
"end": 67,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"token": {
"Character": {
"value": "t"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 69,
"end": 70,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"token": {
"Character": {
"value": "p"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 71,
"end": 72,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 73,
"end": 74,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 76,
"end": 77,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"token": {
"Character": {
"value": "p"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"token": {
"Character": {
"value": "."
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 80,
"end": 84,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "p",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 86,
"end": 93,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "body",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 94,
"end": 101,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "html",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
}
]
}