mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +03:00
b206404d94
swc_css_ast: - Add `DeclBlockItem`. - Change `DeclBlock.properties` to `DeclBlock.items`. swc_css_parser: - Add a way to recovered errors.
275 lines
6.0 KiB
JSON
275 lines
6.0 KiB
JSON
{
|
|
"type": "Stylesheet",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 127,
|
|
"ctxt": 0
|
|
},
|
|
"rules": [
|
|
{
|
|
"type": "StyleRule",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 54,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 21,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 21,
|
|
"ctxt": 0
|
|
},
|
|
"hasNestPrefix": false,
|
|
"combinator": null,
|
|
"typeSelector": {
|
|
"type": "NamespacedName",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 21,
|
|
"ctxt": 0
|
|
},
|
|
"prefix": null,
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 20,
|
|
"end": 21,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a"
|
|
}
|
|
},
|
|
"subclassSelectors": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"block": {
|
|
"type": "DeclBlock",
|
|
"span": {
|
|
"start": 22,
|
|
"end": 54,
|
|
"ctxt": 0
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "Property",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 37,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 25,
|
|
"end": 30,
|
|
"ctxt": 0
|
|
},
|
|
"value": "color"
|
|
},
|
|
"values": [
|
|
{
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 32,
|
|
"end": 37,
|
|
"ctxt": 0
|
|
},
|
|
"value": "white"
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "StyleRule",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"hasNestPrefix": false,
|
|
"combinator": null,
|
|
"typeSelector": {
|
|
"type": "NamespacedName",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"prefix": null,
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 56,
|
|
"end": 57,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a"
|
|
}
|
|
},
|
|
"subclassSelectors": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"block": {
|
|
"type": "DeclBlock",
|
|
"span": {
|
|
"start": 58,
|
|
"end": 90,
|
|
"ctxt": 0
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "Property",
|
|
"span": {
|
|
"start": 61,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 61,
|
|
"end": 66,
|
|
"ctxt": 0
|
|
},
|
|
"value": "color"
|
|
},
|
|
"values": [
|
|
{
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 82,
|
|
"end": 87,
|
|
"ctxt": 0
|
|
},
|
|
"value": "white"
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "StyleRule",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 126,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "ComplexSelector",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"selectors": [
|
|
{
|
|
"type": "CompoundSelector",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"hasNestPrefix": false,
|
|
"combinator": null,
|
|
"typeSelector": {
|
|
"type": "NamespacedName",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"prefix": null,
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 92,
|
|
"end": 93,
|
|
"ctxt": 0
|
|
},
|
|
"value": "a"
|
|
}
|
|
},
|
|
"subclassSelectors": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"block": {
|
|
"type": "DeclBlock",
|
|
"span": {
|
|
"start": 108,
|
|
"end": 126,
|
|
"ctxt": 0
|
|
},
|
|
"items": [
|
|
{
|
|
"type": "Property",
|
|
"span": {
|
|
"start": 111,
|
|
"end": 123,
|
|
"ctxt": 0
|
|
},
|
|
"name": {
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 111,
|
|
"end": 116,
|
|
"ctxt": 0
|
|
},
|
|
"value": "color"
|
|
},
|
|
"values": [
|
|
{
|
|
"type": "Text",
|
|
"span": {
|
|
"start": 118,
|
|
"end": 123,
|
|
"ctxt": 0
|
|
},
|
|
"value": "white"
|
|
}
|
|
],
|
|
"important": null
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|