swc/css/parser/tests/recovery/value/quotes/output.json
Alexander Akait 0b76d29ae4
feat(css/ast): Add SelectorList (#2639)
swc_css_ast:
 - Add `SelectorLsit`.
 - Use `SelectorList` instead of `Vec<ComplexSelector>`.
2021-11-04 09:54:55 +00:00

214 lines
5.1 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 40,
"ctxt": 0
},
"rules": [
{
"type": "StyleRule",
"span": {
"start": 0,
"end": 39,
"ctxt": 0
},
"selectors": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"selectors": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 9,
"ctxt": 0
},
"hasNestPrefix": false,
"combinator": null,
"typeSelector": {
"type": "NamespacedName",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Text",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "p",
"raw": "p"
}
},
"subclassSelectors": [
{
"type": "PseudoSelector",
"span": {
"start": 1,
"end": 9,
"ctxt": 0
},
"isElement": true,
"name": {
"type": "Text",
"span": {
"start": 3,
"end": 9,
"ctxt": 0
},
"value": "before",
"raw": "before"
},
"args": {
"type": "Tokens",
"span": {
"start": 0,
"end": 0,
"ctxt": 0
},
"tokens": []
}
}
]
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 10,
"end": 39,
"ctxt": 0
},
"items": [
{
"type": "Tokens",
"span": {
"start": 16,
"end": 38,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 16,
"end": 23,
"ctxt": 0
},
"token": {
"Ident": {
"value": "content",
"raw": "content"
}
}
},
{
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"token": "Colon"
},
{
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"span": {
"start": 25,
"end": 29,
"ctxt": 0
},
"token": {
"BadStr": {
"value": "tes",
"raw": "\"tes"
}
}
},
{
"span": {
"start": 29,
"end": 34,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"span": {
"start": 34,
"end": 35,
"ctxt": 0
},
"token": {
"Ident": {
"value": "t",
"raw": "t"
}
}
},
{
"span": {
"start": 35,
"end": 37,
"ctxt": 0
},
"token": {
"BadStr": {
"value": ";",
"raw": "\";"
}
}
},
{
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n"
}
}
}
]
}
]
}
}
]
}