swc/crates/swc_css_parser/tests/fixture/function/var/output.json
2022-10-29 08:28:39 +00:00

276 lines
6.8 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 79,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 1,
"end": 78,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 1,
"end": 4,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 5,
"end": 78,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 11,
"end": 26,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 11,
"end": 16,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 18,
"end": 26,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 18,
"end": 21,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 22,
"end": 25,
"ctxt": 0
},
"value": "a",
"raw": "--a"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 32,
"end": 48,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 32,
"end": 37,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 39,
"end": 48,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 39,
"end": 42,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 43,
"end": 46,
"ctxt": 0
},
"value": "a",
"raw": "--a"
},
{
"type": "Delimiter",
"span": {
"start": 46,
"end": 47,
"ctxt": 0
},
"value": ","
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 54,
"end": 75,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 54,
"end": 59,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 61,
"end": 75,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 65,
"end": 68,
"ctxt": 0
},
"value": "a",
"raw": "--a"
},
{
"type": "Delimiter",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": ","
},
{
"type": "Ident",
"span": {
"start": 70,
"end": 74,
"ctxt": 0
},
"value": "blue",
"raw": "blue"
}
]
}
],
"important": null
}
]
}
}
]
}