swc/crates/swc_html_parser/tests/fixture/multiline-comments/output.json

862 lines
14 KiB
JSON
Raw Normal View History

2022-04-04 07:12:45 +03:00
{
"type": "Document",
"span": {
"start": 0,
"end": 200,
"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": 34,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "p",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 36,
"end": 37,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"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": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 44,
"end": 45,
"ctxt": 0
},
"token": {
"Character": {
"value": "p"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 47,
"end": 48,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 50,
"end": 51,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"token": {
"Character": {
"value": "p"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 52,
"end": 53,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"token": {
"Character": {
"value": "."
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 54,
"end": 58,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "p",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 59,
"end": 150,
"ctxt": 0
},
"token": {
"Comment": {
"data": "\n<p>Look at this cool image:</p>\n<img border=\"0\" src=\"pic_trulli.jpg\" alt=\"Trulli\">\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"token": {
"StartTag": {
"tag_name": "p",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"token": {
"Character": {
"value": "T"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 155,
"end": 156,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"token": {
"Character": {
"value": "i"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"token": {
"Character": {
"value": "s"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 161,
"end": 162,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 162,
"end": 163,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 163,
"end": 164,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"token": {
"Character": {
"value": "p"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 167,
"end": 168,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"token": {
"Character": {
"value": "g"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 169,
"end": 170,
"ctxt": 0
},
"token": {
"Character": {
"value": "r"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"token": {
"Character": {
"value": "a"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 171,
"end": 172,
"ctxt": 0
},
"token": {
"Character": {
"value": "p"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"token": {
"Character": {
"value": "h"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"token": {
"Character": {
"value": " "
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"token": {
"Character": {
"value": "t"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"token": {
"Character": {
"value": "o"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 176,
"end": 177,
"ctxt": 0
},
"token": {
"Character": {
"value": "o"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"token": {
"Character": {
"value": "."
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 178,
"end": 182,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "p",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 183,
"end": 184,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 184,
"end": 191,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "body",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 192,
"end": 199,
"ctxt": 0
},
"token": {
"EndTag": {
"tag_name": "html",
"self_closing": false,
"attributes": []
}
}
},
{
"type": "TokenAndSpan",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"token": {
"Character": {
"value": "\n"
}
}
}
]
}