swc/crates/swc_css_parser/tests/recovery/function/rgb/output.json
2022-10-28 04:34:23 +00:00

1366 lines
38 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 381,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 1,
"end": 380,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 1,
"end": 5,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 2,
"end": 5,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 6,
"end": 380,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 12,
"end": 30,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 12,
"end": 17,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 19,
"end": 30,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 19,
"end": 22,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 23,
"end": 29,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 37,
"end": 65,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 37,
"end": 42,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 44,
"end": 65,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 44,
"end": 47,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 48,
"end": 54,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 56,
"end": 59,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 59,
"end": 60,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 60,
"end": 61,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 61,
"end": 64,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 71,
"end": 99,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 71,
"end": 76,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 78,
"end": 99,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 78,
"end": 81,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 82,
"end": 85,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 93,
"end": 94,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 94,
"end": 95,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 95,
"end": 98,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 105,
"end": 133,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 105,
"end": 110,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 112,
"end": 133,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 116,
"end": 119,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 121,
"end": 124,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 124,
"end": 125,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 125,
"end": 126,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 126,
"end": 132,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 139,
"end": 172,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 139,
"end": 144,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 146,
"end": 172,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 146,
"end": 149,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 153,
"end": 154,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 155,
"end": 158,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 159,
"end": 160,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 160,
"end": 163,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 163,
"end": 164,
"ctxt": 0
},
"token": "Comma"
},
{
"type": "PreservedToken",
"span": {
"start": 164,
"end": 165,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 179,
"end": 205,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 179,
"end": 184,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 186,
"end": 205,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 186,
"end": 189,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 190,
"end": 196,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 196,
"end": 197,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 197,
"end": 200,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 200,
"end": 201,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 201,
"end": 204,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 211,
"end": 237,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 211,
"end": 216,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 218,
"end": 237,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 218,
"end": 221,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 222,
"end": 225,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 226,
"end": 232,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 233,
"end": 236,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 243,
"end": 269,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 243,
"end": 248,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 250,
"end": 269,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 250,
"end": 253,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 254,
"end": 257,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 261,
"end": 262,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 262,
"end": 268,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 275,
"end": 307,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 275,
"end": 280,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 282,
"end": 307,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 282,
"end": 285,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 286,
"end": 289,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 290,
"end": 293,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 294,
"end": 297,
"ctxt": 0
},
"token": {
"Number": {
"value": 100.0,
"raw": "100",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"token": {
"Delim": {
"value": "/"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 300,
"end": 306,
"ctxt": 0
},
"token": {
"String": {
"value": "test",
"raw": "\"test\""
}
}
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 314,
"end": 336,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 314,
"end": 319,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 321,
"end": 336,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 321,
"end": 324,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "Function",
"span": {
"start": 325,
"end": 335,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 325,
"end": 328,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 329,
"end": 334,
"ctxt": 0
},
"value": "red",
"raw": "--red"
}
]
}
]
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 342,
"end": 377,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 342,
"end": 347,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Function",
"span": {
"start": 349,
"end": 377,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 349,
"end": 352,
"ctxt": 0
},
"value": "rgb",
"raw": "rgb"
},
"value": [
{
"type": "Function",
"span": {
"start": 353,
"end": 363,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 353,
"end": 356,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 357,
"end": 362,
"ctxt": 0
},
"value": "red",
"raw": "--red"
}
]
},
{
"type": "Function",
"span": {
"start": 364,
"end": 376,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 364,
"end": 367,
"ctxt": 0
},
"value": "var",
"raw": "var"
},
"value": [
{
"type": "DashedIdent",
"span": {
"start": 368,
"end": 375,
"ctxt": 0
},
"value": "green",
"raw": "--green"
}
]
}
]
}
],
"important": null
}
]
}
}
]
}