swc/crates/swc_css_parser/tests/fixture/comment/leading-comments.json
Donny/강동윤 d1097ccb59
feat(css/parser): Store lexed comments (#8091)
**Description:**

For now, we leave every comment as a leading comment. As logic for determining leading vs trailing is quite complex, I'll do it with another PR.
2023-10-10 11:42:20 +00:00

271 lines
4.1 KiB
JSON

{
"506": [
{
"kind": "Block",
"span": {
"start": 360,
"end": 371,
"ctxt": 0
},
"text": "/*!test*/"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 382,
"ctxt": 0
},
"text": "/*!te\nst*/"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 395,
"ctxt": 0
},
"text": "/*!te\n\n\nst*/"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 407,
"ctxt": 0
},
"text": "/*!te**st*/"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 438,
"ctxt": 0
},
"text": "/****************************/"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 478,
"ctxt": 0
},
"text": "/*************** FOO *****************/"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 492,
"ctxt": 0
},
"text": "/* comment */"
},
{
"kind": "Block",
"span": {
"start": 360,
"end": 505,
"ctxt": 0
},
"text": "/* comment *//* comment */"
}
],
"238": [
{
"kind": "Block",
"span": {
"start": 228,
"end": 236,
"ctxt": 0
},
"text": "/* b */"
}
],
"14": [
{
"kind": "Block",
"span": {
"start": 1,
"end": 14,
"ctxt": 0
},
"text": "/* comment */"
}
],
"133": [
{
"kind": "Block",
"span": {
"start": 95,
"end": 121,
"ctxt": 0
},
"text": "/* a { color: black } */"
},
{
"kind": "Block",
"span": {
"start": 95,
"end": 126,
"ctxt": 0
},
"text": "/**/"
},
{
"kind": "Block",
"span": {
"start": 95,
"end": 132,
"ctxt": 0
},
"text": "/* */"
}
],
"226": [
{
"kind": "Block",
"span": {
"start": 212,
"end": 226,
"ctxt": 0
},
"text": "/* end */"
}
],
"191": [
{
"kind": "Block",
"span": {
"start": 173,
"end": 191,
"ctxt": 0
},
"text": "/* between */"
}
],
"92": [
{
"kind": "Block",
"span": {
"start": 76,
"end": 92,
"ctxt": 0
},
"text": "/* comment */"
}
],
"313": [
{
"kind": "Block",
"span": {
"start": 294,
"end": 313,
"ctxt": 0
},
"text": "/* comment */"
}
],
"28": [
{
"kind": "Block",
"span": {
"start": 14,
"end": 28,
"ctxt": 0
},
"text": "/* comment */"
}
],
"357": [
{
"kind": "Block",
"span": {
"start": 343,
"end": 357,
"ctxt": 0
},
"text": "/* comment */"
}
],
"336": [
{
"kind": "Block",
"span": {
"start": 322,
"end": 336,
"ctxt": 0
},
"text": "/* comment */"
}
],
"62": [
{
"kind": "Block",
"span": {
"start": 44,
"end": 62,
"ctxt": 0
},
"text": "/* comment */"
}
],
"155": [
{
"kind": "Block",
"span": {
"start": 138,
"end": 155,
"ctxt": 0
},
"text": "/* inside */"
}
],
"271": [
{
"kind": "Block",
"span": {
"start": 259,
"end": 271,
"ctxt": 0
},
"text": "/* c */"
}
],
"76": [
{
"kind": "Block",
"span": {
"start": 62,
"end": 76,
"ctxt": 0
},
"text": "/* comment */"
}
],
"44": [
{
"kind": "Block",
"span": {
"start": 30,
"end": 44,
"ctxt": 0
},
"text": "/* comment */"
}
],
"294": [
{
"kind": "Block",
"span": {
"start": 275,
"end": 294,
"ctxt": 0
},
"text": "/* comment */"
}
]
}