swc/crates/swc_css_parser/tests/recovery/declaration/output.json

303 lines
7.0 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 81,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 38,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 0,
"end": 6,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 1,
"end": 6,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 7,
"end": 38,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 13,
"end": 20,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 13,
"end": 17,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 25,
"end": 35,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 25,
"end": 30,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 32,
"end": 35,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 40,
"end": 80,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 40,
"end": 46,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 40,
"end": 46,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 40,
"end": 46,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 40,
"end": 46,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 41,
"end": 46,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 47,
"end": 80,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Tokens",
"span": {
"start": 53,
"end": 61,
"ctxt": 0
},
"tokens": [
{
"type": "PreservedToken",
"span": {
"start": 53,
"end": 57,
"ctxt": 0
},
"token": {
"Ident": {
"value": "prop",
"raw": "prop"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"token": {
"Delim": {
"value": "!"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"token": {
"Delim": {
"value": "!"
}
}
}
]
},
{
"type": "Declaration",
"span": {
"start": 67,
"end": 77,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 67,
"end": 72,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 74,
"end": 77,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
}
]
}