swc/crates/swc_css_parser/tests/fixture/number/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

1149 lines
28 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 676,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 0,
"end": 675,
"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": "TypeSelector",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"prefix": null,
"name": {
"type": "Identifier",
"span": {
"start": 0,
"end": 3,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "Block",
"span": {
"start": 4,
"end": 675,
"ctxt": 0
},
"value": [
{
"type": "Declaration",
"span": {
"start": 10,
"end": 22,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 10,
"end": 18,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 20,
"end": 22,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 28,
"end": 41,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 28,
"end": 36,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"value": 10.0,
"raw": "+10"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 47,
"end": 60,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 47,
"end": 55,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 57,
"end": 60,
"ctxt": 0
},
"value": -10.0,
"raw": "-10"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 66,
"end": 79,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 66,
"end": 74,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 76,
"end": 79,
"ctxt": 0
},
"value": 0.1,
"raw": "0.1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 85,
"end": 99,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 85,
"end": 93,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 95,
"end": 99,
"ctxt": 0
},
"value": 0.1,
"raw": "+0.1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 105,
"end": 119,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 105,
"end": 113,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 115,
"end": 119,
"ctxt": 0
},
"value": -0.1,
"raw": "-0.1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 125,
"end": 138,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 125,
"end": 133,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 135,
"end": 138,
"ctxt": 0
},
"value": -0.1,
"raw": "-.1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 144,
"end": 157,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 144,
"end": 152,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 154,
"end": 157,
"ctxt": 0
},
"value": 0.1,
"raw": "+.1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 163,
"end": 174,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 163,
"end": 171,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 173,
"end": 174,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 180,
"end": 192,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 180,
"end": 188,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 190,
"end": 192,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 198,
"end": 211,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 198,
"end": 206,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 208,
"end": 211,
"ctxt": 0
},
"value": 0.1,
"raw": ".10"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 217,
"end": 232,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 217,
"end": 225,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 227,
"end": 232,
"ctxt": 0
},
"value": 12.34,
"raw": "12.34"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 238,
"end": 251,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 238,
"end": 246,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 248,
"end": 251,
"ctxt": 0
},
"value": 0.1,
"raw": "0.1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 257,
"end": 270,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 257,
"end": 265,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 267,
"end": 270,
"ctxt": 0
},
"value": 1.0,
"raw": "1.0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 276,
"end": 289,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 276,
"end": 284,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 286,
"end": 289,
"ctxt": 0
},
"value": 0.0,
"raw": "0.0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 295,
"end": 309,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 295,
"end": 303,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 305,
"end": 309,
"ctxt": 0
},
"value": 0.0,
"raw": "+0.0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 315,
"end": 329,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 315,
"end": 323,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 325,
"end": 329,
"ctxt": 0
},
"value": -0.0,
"raw": "-0.0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 335,
"end": 347,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 335,
"end": 343,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 345,
"end": 347,
"ctxt": 0
},
"value": 0.0,
"raw": ".0"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 353,
"end": 371,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 353,
"end": 361,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 363,
"end": 371,
"ctxt": 0
},
"value": 1.2,
"raw": "1.200000"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 377,
"end": 392,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 377,
"end": 385,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 387,
"end": 392,
"ctxt": 0
},
"value": 120.0,
"raw": "1.2e2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 398,
"end": 411,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 398,
"end": 406,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 408,
"end": 411,
"ctxt": 0
},
"value": 100.0,
"raw": "1e2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 417,
"end": 431,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 417,
"end": 425,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 427,
"end": 431,
"ctxt": 0
},
"value": 20.0,
"raw": ".2e2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 437,
"end": 452,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 437,
"end": 445,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 447,
"end": 452,
"ctxt": 0
},
"value": 120.0,
"raw": "1.2E2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 458,
"end": 474,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 458,
"end": 466,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 468,
"end": 474,
"ctxt": 0
},
"value": 120.0,
"raw": "1.2e+2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 480,
"end": 496,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 480,
"end": 488,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 490,
"end": 496,
"ctxt": 0
},
"value": 0.012,
"raw": "1.2e-2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 502,
"end": 514,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 502,
"end": 510,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 512,
"end": 514,
"ctxt": 0
},
"value": -1.0,
"raw": "-1"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 520,
"end": 534,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 520,
"end": 528,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 530,
"end": 534,
"ctxt": 0
},
"value": -1.2,
"raw": "-1.2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 540,
"end": 553,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 540,
"end": 548,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 550,
"end": 553,
"ctxt": 0
},
"value": -0.2,
"raw": "-.2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 559,
"end": 572,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 559,
"end": 567,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 569,
"end": 572,
"ctxt": 0
},
"value": -0.2,
"raw": "-.2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 578,
"end": 591,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 578,
"end": 586,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 588,
"end": 591,
"ctxt": 0
},
"value": 0.2,
"raw": "+.2"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 597,
"end": 613,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 597,
"end": 605,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 607,
"end": 613,
"ctxt": 0
},
"value": -1200.0,
"raw": "-1.2e3"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 619,
"end": 633,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 619,
"end": 627,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 629,
"end": 633,
"ctxt": 0
},
"value": 1.75,
"raw": "1.75"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 639,
"end": 654,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 639,
"end": 647,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "Number",
"span": {
"start": 649,
"end": 654,
"ctxt": 0
},
"value": 1.75,
"raw": "+1.75"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 660,
"end": 672,
"ctxt": 0
},
"property": {
"type": "Identifier",
"span": {
"start": 660,
"end": 668,
"ctxt": 0
},
"value": "property",
"raw": "property"
},
"value": [
{
"type": "UnitValue",
"span": {
"start": 670,
"end": 672,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 670,
"end": 671,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"unit": {
"span": {
"start": 671,
"end": 672,
"ctxt": 0
},
"value": "e",
"raw": "e"
}
}
],
"important": null
}
]
}
}
]
}