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

543 lines
14 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 181,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 180,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 4,
"end": 180,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 27,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 10,
"end": 14,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 16,
"end": 27,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 16,
"end": 20,
"ctxt": 0
},
"value": "func",
"raw": "func"
},
"value": [
{
"type": "Number",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
{
"type": "PreservedToken",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"token": {
"Delim": {
"value": "+"
}
}
},
{
"type": "Number",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 33,
"end": 56,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 33,
"end": 37,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 39,
"end": 56,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 39,
"end": 43,
"ctxt": 0
},
"value": "func",
"raw": "func"
},
"value": [
{
"type": "Ident",
"span": {
"start": 44,
"end": 49,
"ctxt": 0
},
"value": "ident",
"raw": "ident"
},
{
"type": "PreservedToken",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"token": {
"Delim": {
"value": "."
}
}
},
{
"type": "Ident",
"span": {
"start": 50,
"end": 55,
"ctxt": 0
},
"value": "ident",
"raw": "ident"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 62,
"end": 92,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 62,
"end": 66,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 68,
"end": 92,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 68,
"end": 73,
"ctxt": 0
},
"value": "func3",
"raw": "func3"
},
"value": [
{
"type": "Ident",
"span": {
"start": 77,
"end": 82,
"ctxt": 0
},
"value": "ident",
"raw": "ident"
},
{
"type": "PreservedToken",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"token": {
"Delim": {
"value": "."
}
}
},
{
"type": "Ident",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"value": "ident",
"raw": "ident"
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 98,
"end": 119,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 98,
"end": 102,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 104,
"end": 119,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 104,
"end": 108,
"ctxt": 0
},
"value": "func",
"raw": "func"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 109,
"end": 118,
"ctxt": 0
},
"name": "[",
"value": [
{
"type": "Ident",
"span": {
"start": 110,
"end": 113,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
{
"type": "Ident",
"span": {
"start": 114,
"end": 117,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 125,
"end": 147,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 125,
"end": 129,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 131,
"end": 147,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 131,
"end": 135,
"ctxt": 0
},
"value": "func",
"raw": "func"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 136,
"end": 146,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "Ident",
"span": {
"start": 137,
"end": 140,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
{
"type": "Delimiter",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": ","
},
{
"type": "Ident",
"span": {
"start": 142,
"end": 145,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 153,
"end": 177,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 153,
"end": 157,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "Function",
"span": {
"start": 159,
"end": 177,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 159,
"end": 163,
"ctxt": 0
},
"value": "func",
"raw": "func"
},
"value": [
{
"type": "SimpleBlock",
"span": {
"start": 164,
"end": 176,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Ident",
"span": {
"start": 166,
"end": 169,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
},
{
"type": "PreservedToken",
"span": {
"start": 169,
"end": 170,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "Ident",
"span": {
"start": 171,
"end": 174,
"ctxt": 0
},
"value": "bar",
"raw": "bar"
}
]
}
]
}
],
"important": null
}
]
}
}
]
}