swc/crates/swc_css_parser/tests/recovery/number/output.json
2022-10-29 08:28:39 +00:00

327 lines
8.1 KiB
JSON

{
"type": "Stylesheet",
"span": {
"start": 1,
"end": 71,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 1,
"end": 71,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 1,
"end": 2,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 3,
"end": 71,
"ctxt": 0
},
"name": {
"type": "PreservedToken",
"span": {
"start": 3,
"end": 4,
"ctxt": 0
},
"token": "LBrace"
},
"value": [
{
"type": "Declaration",
"span": {
"start": 9,
"end": 70,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 9,
"end": 13,
"ctxt": 0
},
"value": "prop",
"raw": "prop"
},
"value": [
{
"type": "PreservedToken",
"span": {
"start": 15,
"end": 22,
"ctxt": 0
},
"token": {
"Dimension": {
"value": 10.1,
"raw_value": "10.10",
"unit": "px",
"raw_unit": "px",
"type": "number"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 22,
"end": 27,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 27,
"end": 32,
"ctxt": 0
},
"token": {
"Ident": {
"value": "prop1",
"raw": "prop1"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 32,
"end": 33,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 33,
"end": 34,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 34,
"end": 38,
"ctxt": 0
},
"token": {
"Dimension": {
"value": 10.0,
"raw_value": "10",
"unit": "px",
"raw_unit": "px",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 38,
"end": 43,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 43,
"end": 48,
"ctxt": 0
},
"token": {
"Ident": {
"value": "prop2",
"raw": "prop2"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 49,
"end": 50,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 50,
"end": 52,
"ctxt": 0
},
"token": {
"Number": {
"value": 10.0,
"raw": "10",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 52,
"end": 57,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 57,
"end": 62,
"ctxt": 0
},
"token": {
"Ident": {
"value": "prop3",
"raw": "prop3"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 62,
"end": 63,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 64,
"end": 69,
"ctxt": 0
},
"token": {
"Number": {
"value": 10.1,
"raw": "10.10",
"type": "number"
}
}
}
],
"important": null
}
]
}
}
]
}