swc/crates/swc_css_parser/tests/recovery/comments/output.json
Alexander Akait 8781527751
fix(css/ast): Fix type definitions related to parsing unknown at-rules (#2922)
swc_css_ast:
 - Rename `FnValue` to `Function`.
2021-12-01 17:07:49 +00:00

211 lines
4.8 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 80,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 80,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TypeSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 2,
"end": 80,
"ctxt": 0
},
"value": [
{
"type": "Tokens",
"span": {
"start": 8,
"end": 79,
"ctxt": 0
},
"tokens": [
{
"span": {
"start": 8,
"end": 12,
"ctxt": 0
},
"token": {
"Ident": {
"value": "prop",
"raw": "prop"
}
}
},
{
"span": {
"start": 12,
"end": 13,
"ctxt": 0
},
"token": "Colon"
},
{
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"span": {
"start": 14,
"end": 18,
"ctxt": 0
},
"token": {
"Function": {
"value": "url",
"raw": "url"
}
}
},
{
"span": {
"start": 18,
"end": 24,
"ctxt": 0
},
"token": {
"Str": {
"value": "test",
"raw": "\"test\""
}
}
},
{
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"token": "RParen"
},
{
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"span": {
"start": 39,
"end": 42,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"span": {
"start": 55,
"end": 64,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"span": {
"start": 77,
"end": 78,
"ctxt": 0
},
"token": "Colon"
},
{
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n"
}
}
}
]
}
]
}
}
]
}