feat(css/parser): Improve error reporting (#3999)

This commit is contained in:
Alexander Akait 2022-03-13 21:37:42 +03:00 committed by GitHub
parent 3cfe4ccb94
commit 96d6f37c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 15483 additions and 167 deletions

View File

@ -438,7 +438,7 @@ where
_ => {
return Err(Error::new(
span,
ErrorKind::Expected("string, url or function"),
ErrorKind::Expected("string, url or function token"),
))
}
};

View File

@ -1910,7 +1910,10 @@ where
let span = self.input.cur_span()?;
if !is_one_of!(self, Url, Function) {
return Err(Error::new(span, ErrorKind::Expected("url or function")));
return Err(Error::new(
span,
ErrorKind::Expected("url or function (with 'url' or 'src' name) token"),
));
}
match bump!(self) {
@ -1958,7 +1961,10 @@ where
if &*function_name.to_ascii_lowercase() != "url"
&& &*function_name.to_ascii_lowercase() != "src"
{
return Err(Error::new(span, ErrorKind::Expected("'url' or 'src' name")));
return Err(Error::new(
span,
ErrorKind::Expected("'url' or 'src' name of a function token"),
));
}
let name = Ident {

View File

@ -118,3 +118,20 @@
color: red
}
}
@supports (animation-name: test) {
@-custom-keyframe anim {
from {
color: black;
}
to {
color: white
}
}
}
@supports selector(:focus-visible) {
a:focus-visible {
background: yellow;
}
}

View File

@ -2,7 +2,7 @@
"type": "Stylesheet",
"span": {
"start": 0,
"end": 2750,
"end": 3018,
"ctxt": 0
},
"rules": [
@ -6972,6 +6972,630 @@
}
]
}
},
{
"type": "SupportsRule",
"span": {
"start": 2751,
"end": 2921,
"ctxt": 0
},
"condition": {
"type": "SupportsCondition",
"span": {
"start": 2761,
"end": 2783,
"ctxt": 0
},
"conditions": [
{
"type": "Declaration",
"span": {
"start": 2762,
"end": 2782,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2762,
"end": 2776,
"ctxt": 0
},
"value": "animation-name",
"raw": "animation-name"
},
"value": [
{
"type": "Ident",
"span": {
"start": 2778,
"end": 2782,
"ctxt": 0
},
"value": "test",
"raw": "test"
}
],
"important": null
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 2784,
"end": 2921,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "UnknownAtRule",
"span": {
"start": 2790,
"end": 2919,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2791,
"end": 2807,
"ctxt": 0
},
"value": "-custom-keyframe",
"raw": "-custom-keyframe"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 2807,
"end": 2808,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2808,
"end": 2812,
"ctxt": 0
},
"token": {
"Ident": {
"value": "anim",
"raw": "anim"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2812,
"end": 2813,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
],
"block": {
"type": "SimpleBlock",
"span": {
"start": 2813,
"end": 2919,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 2814,
"end": 2823,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2823,
"end": 2827,
"ctxt": 0
},
"token": {
"Ident": {
"value": "from",
"raw": "from"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2827,
"end": 2828,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "SimpleBlock",
"span": {
"start": 2828,
"end": 2865,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 2829,
"end": 2842,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2842,
"end": 2847,
"ctxt": 0
},
"token": {
"Ident": {
"value": "color",
"raw": "color"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2847,
"end": 2848,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 2848,
"end": 2849,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2849,
"end": 2854,
"ctxt": 0
},
"token": {
"Ident": {
"value": "black",
"raw": "black"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2854,
"end": 2855,
"ctxt": 0
},
"token": "Semi"
},
{
"type": "PreservedToken",
"span": {
"start": 2855,
"end": 2864,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
}
]
},
{
"type": "PreservedToken",
"span": {
"start": 2865,
"end": 2874,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2874,
"end": 2876,
"ctxt": 0
},
"token": {
"Ident": {
"value": "to",
"raw": "to"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2876,
"end": 2877,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "SimpleBlock",
"span": {
"start": 2877,
"end": 2913,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 2878,
"end": 2891,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2891,
"end": 2896,
"ctxt": 0
},
"token": {
"Ident": {
"value": "color",
"raw": "color"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2896,
"end": 2897,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 2897,
"end": 2898,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2898,
"end": 2903,
"ctxt": 0
},
"token": {
"Ident": {
"value": "white",
"raw": "white"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2903,
"end": 2912,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
}
]
},
{
"type": "PreservedToken",
"span": {
"start": 2913,
"end": 2918,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
}
]
}
}
]
}
},
{
"type": "SupportsRule",
"span": {
"start": 2923,
"end": 3017,
"ctxt": 0
},
"condition": {
"type": "SupportsCondition",
"span": {
"start": 2933,
"end": 2957,
"ctxt": 0
},
"conditions": [
{
"type": "Function",
"span": {
"start": 2933,
"end": 2957,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2933,
"end": 2941,
"ctxt": 0
},
"value": "selector",
"raw": "selector"
},
"value": [
{
"type": "ComplexSelector",
"span": {
"start": 2942,
"end": 2956,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 2942,
"end": 2956,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "PseudoClassSelector",
"span": {
"start": 2942,
"end": 2956,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2943,
"end": 2956,
"ctxt": 0
},
"value": "focus-visible",
"raw": "focus-visible"
},
"children": null
}
]
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 2958,
"end": 3017,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "QualifiedRule",
"span": {
"start": 2964,
"end": 3015,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 2964,
"end": 2979,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 2964,
"end": 2979,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 2964,
"end": 2979,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 2964,
"end": 2965,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 2964,
"end": 2965,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 2964,
"end": 2965,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
}
},
"subclassSelectors": [
{
"type": "PseudoClassSelector",
"span": {
"start": 2965,
"end": 2979,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2966,
"end": 2979,
"ctxt": 0
},
"value": "focus-visible",
"raw": "focus-visible"
},
"children": null
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 2980,
"end": 3015,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 2990,
"end": 3008,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 2990,
"end": 3000,
"ctxt": 0
},
"value": "background",
"raw": "background"
},
"value": [
{
"type": "Ident",
"span": {
"start": 3002,
"end": 3008,
"ctxt": 0
},
"value": "yellow",
"raw": "yellow"
}
],
"important": null
}
]
}
}
]
}
}
]
}

View File

@ -6,8 +6,8 @@ error: Stylesheet
3 | | display: grid;
4 | | }
... |
119 | | }
120 | | }
136 | | }
137 | | }
| |__^
error: Rule
@ -8145,3 +8145,774 @@ error: Ident
118 | color: red
| ^^^
error: Rule
--> $DIR/tests/fixture/at-rule/supports/input.css:122:1
|
122 | / @supports (animation-name: test) {
123 | | @-custom-keyframe anim {
124 | | from {
125 | | color: black;
... |
130 | | }
131 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/at-rule/supports/input.css:122:1
|
122 | / @supports (animation-name: test) {
123 | | @-custom-keyframe anim {
124 | | from {
125 | | color: black;
... |
130 | | }
131 | | }
| |_^
error: SupportsRule
--> $DIR/tests/fixture/at-rule/supports/input.css:122:1
|
122 | / @supports (animation-name: test) {
123 | | @-custom-keyframe anim {
124 | | from {
125 | | color: black;
... |
130 | | }
131 | | }
| |_^
error: SupportsCondition
--> $DIR/tests/fixture/at-rule/supports/input.css:122:11
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^^^^^^^^^
error: SupportsConditionType
--> $DIR/tests/fixture/at-rule/supports/input.css:122:12
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^^^^^^^
error: SupportsInParens
--> $DIR/tests/fixture/at-rule/supports/input.css:122:12
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^^^^^^^
error: SupportsFeature
--> $DIR/tests/fixture/at-rule/supports/input.css:122:12
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/supports/input.css:122:12
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/at-rule/supports/input.css:122:12
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:122:12
|
122 | @supports (animation-name: test) {
| ^^^^^^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:122:28
|
122 | @supports (animation-name: test) {
| ^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:122:28
|
122 | @supports (animation-name: test) {
| ^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:122:34
|
122 | @supports (animation-name: test) {
| __________________________________^
123 | | @-custom-keyframe anim {
124 | | from {
125 | | color: black;
... |
130 | | }
131 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:123:5
|
123 | / @-custom-keyframe anim {
124 | | from {
125 | | color: black;
126 | | }
... |
129 | | }
130 | | }
| |_____^
error: Rule
--> $DIR/tests/fixture/at-rule/supports/input.css:123:5
|
123 | / @-custom-keyframe anim {
124 | | from {
125 | | color: black;
126 | | }
... |
129 | | }
130 | | }
| |_____^
error: AtRule
--> $DIR/tests/fixture/at-rule/supports/input.css:123:5
|
123 | / @-custom-keyframe anim {
124 | | from {
125 | | color: black;
126 | | }
... |
129 | | }
130 | | }
| |_____^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/supports/input.css:123:5
|
123 | / @-custom-keyframe anim {
124 | | from {
125 | | color: black;
126 | | }
... |
129 | | }
130 | | }
| |_____^
error: AtRuleName
--> $DIR/tests/fixture/at-rule/supports/input.css:123:6
|
123 | @-custom-keyframe anim {
| ^^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:123:6
|
123 | @-custom-keyframe anim {
| ^^^^^^^^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:123:22
|
123 | @-custom-keyframe anim {
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:123:22
|
123 | @-custom-keyframe anim {
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:123:23
|
123 | @-custom-keyframe anim {
| ^^^^
error: Ident { value: Atom('anim' type=inline), raw: Atom('anim' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:123:23
|
123 | @-custom-keyframe anim {
| ^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:123:27
|
123 | @-custom-keyframe anim {
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:123:27
|
123 | @-custom-keyframe anim {
| ^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:123:28
|
123 | @-custom-keyframe anim {
| ____________________________^
124 | | from {
125 | | color: black;
126 | | }
... |
129 | | }
130 | | }
| |_____^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:123:29
|
123 | @-custom-keyframe anim {
| _____________________________^
124 | | from {
| |________^
error: WhiteSpace { value: Atom('
' type=dynamic) }
--> $DIR/tests/fixture/at-rule/supports/input.css:123:29
|
123 | @-custom-keyframe anim {
| _____________________________^
124 | | from {
| |________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:124:9
|
124 | from {
| ^^^^
error: Ident { value: Atom('from' type=static), raw: Atom('from' type=static) }
--> $DIR/tests/fixture/at-rule/supports/input.css:124:9
|
124 | from {
| ^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:124:13
|
124 | from {
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:124:13
|
124 | from {
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:124:14
|
124 | from {
| ______________^
125 | | color: black;
126 | | }
| |_________^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:124:14
|
124 | from {
| ______________^
125 | | color: black;
126 | | }
| |_________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:124:15
|
124 | from {
| _______________^
125 | | color: black;
| |____________^
error: WhiteSpace { value: Atom('
' type=dynamic) }
--> $DIR/tests/fixture/at-rule/supports/input.css:124:15
|
124 | from {
| _______________^
125 | | color: black;
| |____________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:125:13
|
125 | color: black;
| ^^^^^
error: Ident { value: Atom('color' type=inline), raw: Atom('color' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:125:13
|
125 | color: black;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:125:18
|
125 | color: black;
| ^
error: Colon
--> $DIR/tests/fixture/at-rule/supports/input.css:125:18
|
125 | color: black;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:125:19
|
125 | color: black;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:125:19
|
125 | color: black;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:125:20
|
125 | color: black;
| ^^^^^
error: Ident { value: Atom('black' type=inline), raw: Atom('black' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:125:20
|
125 | color: black;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:125:25
|
125 | color: black;
| ^
error: Semi
--> $DIR/tests/fixture/at-rule/supports/input.css:125:25
|
125 | color: black;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:125:26
|
125 | color: black;
| __________________________^
126 | | }
| |________^
error: WhiteSpace { value: Atom('
' type=dynamic) }
--> $DIR/tests/fixture/at-rule/supports/input.css:125:26
|
125 | color: black;
| __________________________^
126 | | }
| |________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:126:10
|
126 | }
| __________^
127 | | to {
| |________^
error: WhiteSpace { value: Atom('
' type=dynamic) }
--> $DIR/tests/fixture/at-rule/supports/input.css:126:10
|
126 | }
| __________^
127 | | to {
| |________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:127:9
|
127 | to {
| ^^
error: Ident { value: Atom('to' type=inline), raw: Atom('to' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:127:9
|
127 | to {
| ^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:127:11
|
127 | to {
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:127:11
|
127 | to {
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:127:12
|
127 | to {
| ____________^
128 | | color: white
129 | | }
| |_________^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:127:12
|
127 | to {
| ____________^
128 | | color: white
129 | | }
| |_________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:127:13
|
127 | to {
| _____________^
128 | | color: white
| |____________^
error: WhiteSpace { value: Atom('
' type=dynamic) }
--> $DIR/tests/fixture/at-rule/supports/input.css:127:13
|
127 | to {
| _____________^
128 | | color: white
| |____________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:128:13
|
128 | color: white
| ^^^^^
error: Ident { value: Atom('color' type=inline), raw: Atom('color' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:128:13
|
128 | color: white
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:128:18
|
128 | color: white
| ^
error: Colon
--> $DIR/tests/fixture/at-rule/supports/input.css:128:18
|
128 | color: white
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:128:19
|
128 | color: white
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:128:19
|
128 | color: white
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:128:20
|
128 | color: white
| ^^^^^
error: Ident { value: Atom('white' type=inline), raw: Atom('white' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:128:20
|
128 | color: white
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:128:25
|
128 | color: white
| _________________________^
129 | | }
| |________^
error: WhiteSpace { value: Atom('
' type=dynamic) }
--> $DIR/tests/fixture/at-rule/supports/input.css:128:25
|
128 | color: white
| _________________________^
129 | | }
| |________^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:129:10
|
129 | }
| __________^
130 | | }
| |____^
error: WhiteSpace { value: Atom('
' type=inline) }
--> $DIR/tests/fixture/at-rule/supports/input.css:129:10
|
129 | }
| __________^
130 | | }
| |____^
error: Rule
--> $DIR/tests/fixture/at-rule/supports/input.css:133:1
|
133 | / @supports selector(:focus-visible) {
134 | | a:focus-visible {
135 | | background: yellow;
136 | | }
137 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/at-rule/supports/input.css:133:1
|
133 | / @supports selector(:focus-visible) {
134 | | a:focus-visible {
135 | | background: yellow;
136 | | }
137 | | }
| |_^
error: SupportsRule
--> $DIR/tests/fixture/at-rule/supports/input.css:133:1
|
133 | / @supports selector(:focus-visible) {
134 | | a:focus-visible {
135 | | background: yellow;
136 | | }
137 | | }
| |_^
error: SupportsCondition
--> $DIR/tests/fixture/at-rule/supports/input.css:133:11
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: SupportsConditionType
--> $DIR/tests/fixture/at-rule/supports/input.css:133:11
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: SupportsInParens
--> $DIR/tests/fixture/at-rule/supports/input.css:133:11
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: SupportsFeature
--> $DIR/tests/fixture/at-rule/supports/input.css:133:11
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: Function
--> $DIR/tests/fixture/at-rule/supports/input.css:133:11
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:133:11
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:133:20
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:133:20
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:133:20
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:133:20
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^
error: PseudoClassSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:133:20
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:133:21
|
133 | @supports selector(:focus-visible) {
| ^^^^^^^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:133:36
|
133 | @supports selector(:focus-visible) {
| ____________________________________^
134 | | a:focus-visible {
135 | | background: yellow;
136 | | }
137 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | / a:focus-visible {
135 | | background: yellow;
136 | | }
| |_____^
error: Rule
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | / a:focus-visible {
135 | | background: yellow;
136 | | }
| |_____^
error: QualifiedRule
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | / a:focus-visible {
135 | | background: yellow;
136 | | }
| |_____^
error: SelectorList
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^^^^^^^^^^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^^^^^^^^^^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^^^^^^^^^^^^^^^
error: TypeSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^
error: TagNameSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^
error: WqName
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:134:5
|
134 | a:focus-visible {
| ^
error: SubclassSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:134:6
|
134 | a:focus-visible {
| ^^^^^^^^^^^^^^
error: PseudoClassSelector
--> $DIR/tests/fixture/at-rule/supports/input.css:134:6
|
134 | a:focus-visible {
| ^^^^^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:134:7
|
134 | a:focus-visible {
| ^^^^^^^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:134:21
|
134 | a:focus-visible {
| _____________________^
135 | | background: yellow;
136 | | }
| |_____^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:135:9
|
135 | background: yellow;
| ^^^^^^^^^^^^^^^^^^
error: StyleBlock
--> $DIR/tests/fixture/at-rule/supports/input.css:135:9
|
135 | background: yellow;
| ^^^^^^^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/at-rule/supports/input.css:135:9
|
135 | background: yellow;
| ^^^^^^^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/at-rule/supports/input.css:135:9
|
135 | background: yellow;
| ^^^^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:135:9
|
135 | background: yellow;
| ^^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/supports/input.css:135:21
|
135 | background: yellow;
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/supports/input.css:135:21
|
135 | background: yellow;
| ^^^^^^

View File

@ -58,7 +58,8 @@
@unknown x ( a , b ) ;
@unknown x ( a , b ) { foo: bar }
@unknown x( a, b ) { foo: bar }
/*@unknown x ( a + b ) ;*/
/*@unknown x ( a - b ) ;*/
/*@unknown x ( a * b ) ;*/
/*@unknown x ( a / b ) ;*/
@unknown x ( a + b ) ;
@unknown x ( a - b ) ;
@unknown x ( a * b ) ;
@unknown x ( a / b ) ;
@unknown{}

View File

@ -2,7 +2,7 @@
"type": "Stylesheet",
"span": {
"start": 0,
"end": 1680,
"end": 1675,
"ctxt": 0
},
"rules": [
@ -5084,6 +5084,747 @@
}
]
}
},
{
"type": "UnknownAtRule",
"span": {
"start": 1572,
"end": 1594,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1573,
"end": 1580,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 1580,
"end": 1581,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1581,
"end": 1582,
"ctxt": 0
},
"token": {
"Ident": {
"value": "x",
"raw": "x"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1582,
"end": 1583,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "SimpleBlock",
"span": {
"start": 1583,
"end": 1592,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 1584,
"end": 1585,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1585,
"end": 1586,
"ctxt": 0
},
"token": {
"Ident": {
"value": "a",
"raw": "a"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1586,
"end": 1587,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1587,
"end": 1588,
"ctxt": 0
},
"token": {
"Delim": {
"value": "+"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1588,
"end": 1589,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1589,
"end": 1590,
"ctxt": 0
},
"token": {
"Ident": {
"value": "b",
"raw": "b"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1590,
"end": 1591,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
},
{
"type": "PreservedToken",
"span": {
"start": 1592,
"end": 1593,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
],
"block": null
},
{
"type": "UnknownAtRule",
"span": {
"start": 1595,
"end": 1617,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1596,
"end": 1603,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 1603,
"end": 1604,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1604,
"end": 1605,
"ctxt": 0
},
"token": {
"Ident": {
"value": "x",
"raw": "x"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1605,
"end": 1606,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "SimpleBlock",
"span": {
"start": 1606,
"end": 1615,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 1607,
"end": 1608,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1608,
"end": 1609,
"ctxt": 0
},
"token": {
"Ident": {
"value": "a",
"raw": "a"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1609,
"end": 1610,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1610,
"end": 1611,
"ctxt": 0
},
"token": {
"Delim": {
"value": "-"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1611,
"end": 1612,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1612,
"end": 1613,
"ctxt": 0
},
"token": {
"Ident": {
"value": "b",
"raw": "b"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1613,
"end": 1614,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
},
{
"type": "PreservedToken",
"span": {
"start": 1615,
"end": 1616,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
],
"block": null
},
{
"type": "UnknownAtRule",
"span": {
"start": 1618,
"end": 1640,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1619,
"end": 1626,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 1626,
"end": 1627,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1627,
"end": 1628,
"ctxt": 0
},
"token": {
"Ident": {
"value": "x",
"raw": "x"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1628,
"end": 1629,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "SimpleBlock",
"span": {
"start": 1629,
"end": 1638,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 1630,
"end": 1631,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1631,
"end": 1632,
"ctxt": 0
},
"token": {
"Ident": {
"value": "a",
"raw": "a"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1632,
"end": 1633,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1633,
"end": 1634,
"ctxt": 0
},
"token": {
"Delim": {
"value": "*"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1634,
"end": 1635,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1635,
"end": 1636,
"ctxt": 0
},
"token": {
"Ident": {
"value": "b",
"raw": "b"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1636,
"end": 1637,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
},
{
"type": "PreservedToken",
"span": {
"start": 1638,
"end": 1639,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
],
"block": null
},
{
"type": "UnknownAtRule",
"span": {
"start": 1641,
"end": 1663,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1642,
"end": 1649,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 1649,
"end": 1650,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1650,
"end": 1651,
"ctxt": 0
},
"token": {
"Ident": {
"value": "x",
"raw": "x"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1651,
"end": 1652,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "SimpleBlock",
"span": {
"start": 1652,
"end": 1661,
"ctxt": 0
},
"name": "(",
"value": [
{
"type": "PreservedToken",
"span": {
"start": 1653,
"end": 1654,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1654,
"end": 1655,
"ctxt": 0
},
"token": {
"Ident": {
"value": "a",
"raw": "a"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1655,
"end": 1656,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1656,
"end": 1657,
"ctxt": 0
},
"token": {
"Delim": {
"value": "/"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1657,
"end": 1658,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1658,
"end": 1659,
"ctxt": 0
},
"token": {
"Ident": {
"value": "b",
"raw": "b"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 1659,
"end": 1660,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
},
{
"type": "PreservedToken",
"span": {
"start": 1661,
"end": 1662,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
],
"block": null
},
{
"type": "UnknownAtRule",
"span": {
"start": 1664,
"end": 1674,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1665,
"end": 1672,
"ctxt": 0
},
"value": "unknown",
"raw": "unknown"
},
"prelude": [],
"block": {
"type": "SimpleBlock",
"span": {
"start": 1672,
"end": 1674,
"ctxt": 0
},
"name": "{",
"value": []
}
}
]
}

View File

@ -6,9 +6,9 @@ error: Stylesheet
3 | | @unknown "blah";
4 | | @unknown \"blah\";
... |
63 | | /*@unknown x ( a * b ) ;*/
64 | | /*@unknown x ( a / b ) ;*/
| |___________________________^
64 | | @unknown x ( a / b ) ;
65 | | @unknown{}
| |___________^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:1:1
@ -5187,3 +5187,735 @@ error: WhiteSpace { value: Atom(' ' type=inline) }
60 | @unknown x( a, b ) { foo: bar }
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:1
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:1
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:1
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRuleName
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:2
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:2
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:9
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:9
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:10
|
61 | @unknown x ( a + b ) ;
| ^
error: Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:10
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:11
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:11
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:12
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:12
|
61 | @unknown x ( a + b ) ;
| ^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:13
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:13
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:14
|
61 | @unknown x ( a + b ) ;
| ^
error: Ident { value: Atom('a' type=inline), raw: Atom('a' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:14
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:15
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:15
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:16
|
61 | @unknown x ( a + b ) ;
| ^
error: Delim { value: '+' }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:16
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:17
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:17
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:18
|
61 | @unknown x ( a + b ) ;
| ^
error: Ident { value: Atom('b' type=inline), raw: Atom('b' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:18
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:19
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:19
|
61 | @unknown x ( a + b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:21
|
61 | @unknown x ( a + b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:61:21
|
61 | @unknown x ( a + b ) ;
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:1
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:1
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:1
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRuleName
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:2
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:2
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:9
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:9
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:10
|
62 | @unknown x ( a - b ) ;
| ^
error: Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:10
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:11
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:11
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:12
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:12
|
62 | @unknown x ( a - b ) ;
| ^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:13
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:13
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:14
|
62 | @unknown x ( a - b ) ;
| ^
error: Ident { value: Atom('a' type=inline), raw: Atom('a' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:14
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:15
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:15
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:16
|
62 | @unknown x ( a - b ) ;
| ^
error: Delim { value: '-' }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:16
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:17
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:17
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:18
|
62 | @unknown x ( a - b ) ;
| ^
error: Ident { value: Atom('b' type=inline), raw: Atom('b' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:18
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:19
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:19
|
62 | @unknown x ( a - b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:21
|
62 | @unknown x ( a - b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:62:21
|
62 | @unknown x ( a - b ) ;
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:1
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:1
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:1
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRuleName
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:2
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:2
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:9
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:9
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:10
|
63 | @unknown x ( a * b ) ;
| ^
error: Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:10
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:11
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:11
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:12
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:12
|
63 | @unknown x ( a * b ) ;
| ^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:13
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:13
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:14
|
63 | @unknown x ( a * b ) ;
| ^
error: Ident { value: Atom('a' type=inline), raw: Atom('a' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:14
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:15
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:15
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:16
|
63 | @unknown x ( a * b ) ;
| ^
error: Delim { value: '*' }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:16
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:17
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:17
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:18
|
63 | @unknown x ( a * b ) ;
| ^
error: Ident { value: Atom('b' type=inline), raw: Atom('b' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:18
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:19
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:19
|
63 | @unknown x ( a * b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:21
|
63 | @unknown x ( a * b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:63:21
|
63 | @unknown x ( a * b ) ;
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:1
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:1
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:1
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^^^^^^^^^^^^^^^^
error: AtRuleName
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:2
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:2
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:9
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:9
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:10
|
64 | @unknown x ( a / b ) ;
| ^
error: Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:10
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:11
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:11
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:12
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:12
|
64 | @unknown x ( a / b ) ;
| ^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:13
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:13
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:14
|
64 | @unknown x ( a / b ) ;
| ^
error: Ident { value: Atom('a' type=inline), raw: Atom('a' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:14
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:15
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:15
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:16
|
64 | @unknown x ( a / b ) ;
| ^
error: Delim { value: '/' }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:16
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:17
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:17
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:18
|
64 | @unknown x ( a / b ) ;
| ^
error: Ident { value: Atom('b' type=inline), raw: Atom('b' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:18
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:19
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:19
|
64 | @unknown x ( a / b ) ;
| ^
error: ComponentValue
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:21
|
64 | @unknown x ( a / b ) ;
| ^
error: WhiteSpace { value: Atom(' ' type=inline) }
--> $DIR/tests/fixture/at-rule/unknown/input.css:64:21
|
64 | @unknown x ( a / b ) ;
| ^
error: Rule
--> $DIR/tests/fixture/at-rule/unknown/input.css:65:1
|
65 | @unknown{}
| ^^^^^^^^^^
error: AtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:65:1
|
65 | @unknown{}
| ^^^^^^^^^^
error: UnknownAtRule
--> $DIR/tests/fixture/at-rule/unknown/input.css:65:1
|
65 | @unknown{}
| ^^^^^^^^^^
error: AtRuleName
--> $DIR/tests/fixture/at-rule/unknown/input.css:65:2
|
65 | @unknown{}
| ^^^^^^^
error: Ident
--> $DIR/tests/fixture/at-rule/unknown/input.css:65:2
|
65 | @unknown{}
| ^^^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/at-rule/unknown/input.css:65:9
|
65 | @unknown{}
| ^^

View File

@ -0,0 +1,17 @@
<!---->
<!-- -->
<!-- .foo { color: red } -->
div {
color: red;
}
<!--
.class {
color: red;
}
-->

View File

@ -0,0 +1,317 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 113,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 24,
"end": 43,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 24,
"end": 28,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 25,
"end": 28,
"ctxt": 0
},
"value": "foo",
"raw": "foo"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 29,
"end": 43,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 31,
"end": 41,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 31,
"end": 36,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 38,
"end": 41,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 50,
"end": 73,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 50,
"end": 53,
"ctxt": 0
},
"value": "div",
"raw": "div"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 54,
"end": 73,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 60,
"end": 70,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 60,
"end": 65,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 67,
"end": 70,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
},
{
"type": "QualifiedRule",
"span": {
"start": 81,
"end": 107,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": null,
"subclassSelectors": [
{
"type": "ClassSelector",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"text": {
"type": "Ident",
"span": {
"start": 82,
"end": 87,
"ctxt": 0
},
"value": "class",
"raw": "class"
}
}
]
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 88,
"end": 107,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 94,
"end": 104,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 94,
"end": 99,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 101,
"end": 104,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
}
]
}
}
]
}

View File

@ -0,0 +1,320 @@
error: Stylesheet
--> $DIR/tests/fixture/cdo-and-cdc/input.css:1:1
|
1 | / <!---->
2 | |
3 | | <!-- -->
4 | |
... |
16 | |
17 | | -->
| |____^
error: Rule
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^^^^^^^^^^^^^^^^
error: QualifiedRule
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^^^^^^^^^^^^^^^^
error: SelectorList
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^
error: ComplexSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^
error: CompoundSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^
error: SubclassSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^
error: ClassSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:6
|
5 | <!-- .foo { color: red } -->
| ^^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:7
|
5 | <!-- .foo { color: red } -->
| ^^^
error: SimpleBlock
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:11
|
5 | <!-- .foo { color: red } -->
| ^^^^^^^^^^^^^^
error: ComponentValue
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:13
|
5 | <!-- .foo { color: red } -->
| ^^^^^^^^^^
error: StyleBlock
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:13
|
5 | <!-- .foo { color: red } -->
| ^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:13
|
5 | <!-- .foo { color: red } -->
| ^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:13
|
5 | <!-- .foo { color: red } -->
| ^^^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:13
|
5 | <!-- .foo { color: red } -->
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:20
|
5 | <!-- .foo { color: red } -->
| ^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:5:20
|
5 | <!-- .foo { color: red } -->
| ^^^
error: Rule
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | / div {
8 | | color: red;
9 | | }
| |_^
error: QualifiedRule
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | / div {
8 | | color: red;
9 | | }
| |_^
error: SelectorList
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: ComplexSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: CompoundSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: TypeSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: TagNameSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: WqName
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:1
|
7 | div {
| ^^^
error: SimpleBlock
--> $DIR/tests/fixture/cdo-and-cdc/input.css:7:5
|
7 | div {
| _____^
8 | | color: red;
9 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:5
|
8 | color: red;
| ^^^^^^^^^^
error: StyleBlock
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:5
|
8 | color: red;
| ^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:5
|
8 | color: red;
| ^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:5
|
8 | color: red;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:5
|
8 | color: red;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:12
|
8 | color: red;
| ^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:8:12
|
8 | color: red;
| ^^^
error: Rule
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | / .class {
14 | | color: red;
15 | | }
| |_^
error: QualifiedRule
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | / .class {
14 | | color: red;
15 | | }
| |_^
error: SelectorList
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | .class {
| ^^^^^^
error: ComplexSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | .class {
| ^^^^^^
error: CompoundSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | .class {
| ^^^^^^
error: SubclassSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | .class {
| ^^^^^^
error: ClassSelector
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:1
|
13 | .class {
| ^^^^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:2
|
13 | .class {
| ^^^^^
error: SimpleBlock
--> $DIR/tests/fixture/cdo-and-cdc/input.css:13:8
|
13 | .class {
| ________^
14 | | color: red;
15 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:5
|
14 | color: red;
| ^^^^^^^^^^
error: StyleBlock
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:5
|
14 | color: red;
| ^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:5
|
14 | color: red;
| ^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:5
|
14 | color: red;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:5
|
14 | color: red;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:12
|
14 | color: red;
| ^^^
error: Ident
--> $DIR/tests/fixture/cdo-and-cdc/input.css:14:12
|
14 | color: red;
| ^^^

View File

@ -0,0 +1,55 @@
/*! something */
@charset 'utf-8';
@page :left {
margin: 2em;
}
@media screen and (foo: 1) {
.class {
color: red;
}
}
*.class element#id[attr] [attr|="asd"][attr=value i]:pseudo::pseudo ~ :not(a, b) + :nth-child(odd):nth-child(2n + 1),
svg|*:matches(a)::slotted(c) > :nth-child(odd of a, :b):nth-child(2n + 1 of [a]),
:has(> img) {
color: green;
/*filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img.png',sizingMethod='scale') alpha(opacity=80);*/
/*width: expression(1 + 2);*/
background:
ident 1.2e+3 100% 4em/5ex calc(1em + 3% * 5),
url(path/to.png) url( 'path/test.svg' )
u+123-456 u+123???
rgba(1, 2, 3, 4) #def #123abc "string" 'string' (parenthesis) [ident] !important;
}
@media (device-aspect-ratio: 16/9) {
*|span:before {
--custom1: { something !important };
--custom2: ([]) !important;
background: element(#id);
}
}
@supports (box-shadow: 1px 2px black !important) {
.rule {
box-shadow: var(--something, fallback);
}
}
.-a#-b:-c::-d[-e][*|-f] {
-foo: 123;
}
<!-- /* CDO/CDC */ -->
@import 'foo' screen;
@keyframes 'anim' {
from { color: red }
50.1% { color: green; background: green }
100% { ;color: blue;; }
}
edge\ .c\61ases {
--empty-var: ;
--bad-var:;
number: 0.1.2.3;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,27 @@
a {
@font-face {
prop1: value;
prop2: value;
}
@font-face {
prop1: value;
;;;;;
prop2: value;
}
@font-face {;;
prop1: value;;
}
@font-face {
prop1: value
}
@font-face {
prop1: value;;;prop2: value
}
@font-face {
prop1: value;;;prop2: value;
}

View File

@ -2,79 +2,22 @@
"type": "Stylesheet",
"span": {
"start": 0,
"end": 42,
"end": 281,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"type": "FontFaceRule",
"span": {
"start": 0,
"end": 41,
"end": 50,
"ctxt": 0
},
"prelude": {
"type": "SelectorList",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "ComplexSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"children": [
{
"type": "CompoundSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"nestingSelector": null,
"typeSelector": {
"type": "TagNameSelector",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"name": {
"type": "WqName",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"prefix": null,
"value": {
"type": "Ident",
"span": {
"start": 0,
"end": 1,
"ctxt": 0
},
"value": "a",
"raw": "a"
}
}
},
"subclassSelectors": []
}
]
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 2,
"end": 41,
"start": 11,
"end": 50,
"ctxt": 0
},
"name": "{",
@ -82,15 +25,15 @@
{
"type": "Declaration",
"span": {
"start": 8,
"end": 20,
"start": 17,
"end": 29,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 8,
"end": 13,
"start": 17,
"end": 22,
"ctxt": 0
},
"value": "prop1",
@ -100,8 +43,8 @@
{
"type": "Ident",
"span": {
"start": 15,
"end": 20,
"start": 24,
"end": 29,
"ctxt": 0
},
"value": "value",
@ -113,15 +56,15 @@
{
"type": "Declaration",
"span": {
"start": 26,
"end": 38,
"start": 35,
"end": 47,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 26,
"end": 31,
"start": 35,
"end": 40,
"ctxt": 0
},
"value": "prop2",
@ -131,8 +74,351 @@
{
"type": "Ident",
"span": {
"start": 33,
"end": 38,
"start": 42,
"end": 47,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
}
]
}
},
{
"type": "FontFaceRule",
"span": {
"start": 52,
"end": 112,
"ctxt": 0
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 63,
"end": 112,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 69,
"end": 81,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 69,
"end": 74,
"ctxt": 0
},
"value": "prop1",
"raw": "prop1"
},
"value": [
{
"type": "Ident",
"span": {
"start": 76,
"end": 81,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 97,
"end": 109,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 97,
"end": 102,
"ctxt": 0
},
"value": "prop2",
"raw": "prop2"
},
"value": [
{
"type": "Ident",
"span": {
"start": 104,
"end": 109,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
}
]
}
},
{
"type": "FontFaceRule",
"span": {
"start": 115,
"end": 150,
"ctxt": 0
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 126,
"end": 150,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 134,
"end": 146,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 134,
"end": 139,
"ctxt": 0
},
"value": "prop1",
"raw": "prop1"
},
"value": [
{
"type": "Ident",
"span": {
"start": 141,
"end": 146,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
}
]
}
},
{
"type": "FontFaceRule",
"span": {
"start": 152,
"end": 183,
"ctxt": 0
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 163,
"end": 183,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 169,
"end": 181,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 169,
"end": 174,
"ctxt": 0
},
"value": "prop1",
"raw": "prop1"
},
"value": [
{
"type": "Ident",
"span": {
"start": 176,
"end": 181,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
}
]
}
},
{
"type": "FontFaceRule",
"span": {
"start": 185,
"end": 231,
"ctxt": 0
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 196,
"end": 231,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 202,
"end": 214,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 202,
"end": 207,
"ctxt": 0
},
"value": "prop1",
"raw": "prop1"
},
"value": [
{
"type": "Ident",
"span": {
"start": 209,
"end": 214,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 217,
"end": 229,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 217,
"end": 222,
"ctxt": 0
},
"value": "prop2",
"raw": "prop2"
},
"value": [
{
"type": "Ident",
"span": {
"start": 224,
"end": 229,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
}
]
}
},
{
"type": "FontFaceRule",
"span": {
"start": 233,
"end": 280,
"ctxt": 0
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 244,
"end": 280,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 250,
"end": 262,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 250,
"end": 255,
"ctxt": 0
},
"value": "prop1",
"raw": "prop1"
},
"value": [
{
"type": "Ident",
"span": {
"start": 257,
"end": 262,
"ctxt": 0
},
"value": "value",
"raw": "value"
}
],
"important": null
},
{
"type": "Declaration",
"span": {
"start": 265,
"end": 277,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 265,
"end": 270,
"ctxt": 0
},
"value": "prop2",
"raw": "prop2"
},
"value": [
{
"type": "Ident",
"span": {
"start": 272,
"end": 277,
"ctxt": 0
},
"value": "value",

View File

@ -1,77 +1,47 @@
error: Stylesheet
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / a {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |__^
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / @font-face {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
... |
26 | | prop1: value;;;prop2: value;
27 | | }
| |__^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / a {
1 | / @font-face {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |_^
error: QualifiedRule
error: AtRule
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | / a {
1 | / @font-face {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |_^
error: SelectorList
error: FontFaceRule
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: ComplexSelector
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: CompoundSelector
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: TypeSelector
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: TagNameSelector
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: WqName
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:1:1
|
1 | a {
| ^
1 | / @font-face {
2 | | prop1: value;
3 | | prop2: value;
4 | | }
| |_^
error: SimpleBlock
--> $DIR/tests/fixture/declaration-list/input.css:1:3
--> $DIR/tests/fixture/declaration-list/input.css:1:12
|
1 | a {
| ___^
1 | @font-face {
| ____________^
2 | | prop1: value;
3 | | prop2: value;
4 | | }
@ -83,12 +53,6 @@ error: ComponentValue
2 | prop1: value;
| ^^^^^^^^^^^^
error: StyleBlock
--> $DIR/tests/fixture/declaration-list/input.css:2:5
|
2 | prop1: value;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:2:5
|
@ -125,12 +89,6 @@ error: ComponentValue
3 | prop2: value;
| ^^^^^^^^^^^^
error: StyleBlock
--> $DIR/tests/fixture/declaration-list/input.css:3:5
|
3 | prop2: value;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:3:5
|
@ -161,3 +119,464 @@ error: Ident
3 | prop2: value;
| ^^^^^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:6:1
|
6 | / @font-face {
7 | | prop1: value;
8 | | ;;;;;
9 | | prop2: value;
10 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/declaration-list/input.css:6:1
|
6 | / @font-face {
7 | | prop1: value;
8 | | ;;;;;
9 | | prop2: value;
10 | | }
| |_^
error: FontFaceRule
--> $DIR/tests/fixture/declaration-list/input.css:6:1
|
6 | / @font-face {
7 | | prop1: value;
8 | | ;;;;;
9 | | prop2: value;
10 | | }
| |_^
error: SimpleBlock
--> $DIR/tests/fixture/declaration-list/input.css:6:12
|
6 | @font-face {
| ____________^
7 | | prop1: value;
8 | | ;;;;;
9 | | prop2: value;
10 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:7:5
|
7 | prop1: value;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:7:5
|
7 | prop1: value;
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:7:5
|
7 | prop1: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:7:5
|
7 | prop1: value;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:7:12
|
7 | prop1: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:7:12
|
7 | prop1: value;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:9:5
|
9 | prop2: value;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:9:5
|
9 | prop2: value;
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:9:5
|
9 | prop2: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:9:5
|
9 | prop2: value;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:9:12
|
9 | prop2: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:9:12
|
9 | prop2: value;
| ^^^^^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:13:1
|
13 | / @font-face {;;
14 | | prop1: value;;
15 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/declaration-list/input.css:13:1
|
13 | / @font-face {;;
14 | | prop1: value;;
15 | | }
| |_^
error: FontFaceRule
--> $DIR/tests/fixture/declaration-list/input.css:13:1
|
13 | / @font-face {;;
14 | | prop1: value;;
15 | | }
| |_^
error: SimpleBlock
--> $DIR/tests/fixture/declaration-list/input.css:13:12
|
13 | @font-face {;;
| ____________^
14 | | prop1: value;;
15 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:14:5
|
14 | prop1: value;;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:14:5
|
14 | prop1: value;;
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:14:5
|
14 | prop1: value;;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:14:5
|
14 | prop1: value;;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:14:12
|
14 | prop1: value;;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:14:12
|
14 | prop1: value;;
| ^^^^^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:17:1
|
17 | / @font-face {
18 | | prop1: value
19 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/declaration-list/input.css:17:1
|
17 | / @font-face {
18 | | prop1: value
19 | | }
| |_^
error: FontFaceRule
--> $DIR/tests/fixture/declaration-list/input.css:17:1
|
17 | / @font-face {
18 | | prop1: value
19 | | }
| |_^
error: SimpleBlock
--> $DIR/tests/fixture/declaration-list/input.css:17:12
|
17 | @font-face {
| ____________^
18 | | prop1: value
19 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:18:5
|
18 | prop1: value
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:18:5
|
18 | prop1: value
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:18:5
|
18 | prop1: value
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:18:5
|
18 | prop1: value
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:18:12
|
18 | prop1: value
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:18:12
|
18 | prop1: value
| ^^^^^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:21:1
|
21 | / @font-face {
22 | | prop1: value;;;prop2: value
23 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/declaration-list/input.css:21:1
|
21 | / @font-face {
22 | | prop1: value;;;prop2: value
23 | | }
| |_^
error: FontFaceRule
--> $DIR/tests/fixture/declaration-list/input.css:21:1
|
21 | / @font-face {
22 | | prop1: value;;;prop2: value
23 | | }
| |_^
error: SimpleBlock
--> $DIR/tests/fixture/declaration-list/input.css:21:12
|
21 | @font-face {
| ____________^
22 | | prop1: value;;;prop2: value
23 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:22:5
|
22 | prop1: value;;;prop2: value
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:22:5
|
22 | prop1: value;;;prop2: value
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:22:5
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:22:5
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:22:12
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:22:12
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:22:20
|
22 | prop1: value;;;prop2: value
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:22:20
|
22 | prop1: value;;;prop2: value
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:22:20
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:22:20
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:22:27
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:22:27
|
22 | prop1: value;;;prop2: value
| ^^^^^
error: Rule
--> $DIR/tests/fixture/declaration-list/input.css:25:1
|
25 | / @font-face {
26 | | prop1: value;;;prop2: value;
27 | | }
| |_^
error: AtRule
--> $DIR/tests/fixture/declaration-list/input.css:25:1
|
25 | / @font-face {
26 | | prop1: value;;;prop2: value;
27 | | }
| |_^
error: FontFaceRule
--> $DIR/tests/fixture/declaration-list/input.css:25:1
|
25 | / @font-face {
26 | | prop1: value;;;prop2: value;
27 | | }
| |_^
error: SimpleBlock
--> $DIR/tests/fixture/declaration-list/input.css:25:12
|
25 | @font-face {
| ____________^
26 | | prop1: value;;;prop2: value;
27 | | }
| |_^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:26:5
|
26 | prop1: value;;;prop2: value;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:26:5
|
26 | prop1: value;;;prop2: value;
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:26:5
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:26:5
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:26:12
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:26:12
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:26:20
|
26 | prop1: value;;;prop2: value;
| ^^^^^^^^^^^^
error: Declaration
--> $DIR/tests/fixture/declaration-list/input.css:26:20
|
26 | prop1: value;;;prop2: value;
| ^^^^^^^^^^^^
error: DeclarationName
--> $DIR/tests/fixture/declaration-list/input.css:26:20
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:26:20
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: ComponentValue
--> $DIR/tests/fixture/declaration-list/input.css:26:27
|
26 | prop1: value;;;prop2: value;
| ^^^^^
error: Ident
--> $DIR/tests/fixture/declaration-list/input.css:26:27
|
26 | prop1: value;;;prop2: value;
| ^^^^^

View File

@ -74,3 +74,42 @@
color: green;
}
}
a {;;
color: black;
; ;
}
a {
;color: pink;
}
a{color:black}
a {
width: 10px;
@mixin mobile {
height: 100px;
}
}
a { color: a/* ; */ b ; }
a { @unknown "a.css"; }
a { @unknown foo {} }
a/**/
{}
:root {
--zero-size: {
width: 0;
height: 0;
};
--small-icon: {
width: 16px;
height: 16px;
}
;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
@import "x.css";;
.color {
color: red;
}

View File

@ -0,0 +1,184 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 44,
"ctxt": 0
},
"rules": [
{
"type": "ImportRule",
"span": {
"start": 0,
"end": 16,
"ctxt": 0
},
"href": {
"type": "String",
"span": {
"start": 8,
"end": 15,
"ctxt": 0
},
"value": "x.css",
"raw": "\"x.css\""
},
"layerName": null,
"supports": null,
"media": null
},
{
"type": "Tokens",
"span": {
"start": 16,
"end": 43,
"ctxt": 0
},
"tokens": [
{
"type": "PreservedToken",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"token": "Semi"
},
{
"type": "PreservedToken",
"span": {
"start": 17,
"end": 19,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n\n"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"token": {
"Delim": {
"value": "."
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 20,
"end": 25,
"ctxt": 0
},
"token": {
"Ident": {
"value": "color",
"raw": "color"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"token": "LBrace"
},
{
"type": "PreservedToken",
"span": {
"start": 27,
"end": 32,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 32,
"end": 37,
"ctxt": 0
},
"token": {
"Ident": {
"value": "color",
"raw": "color"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"token": "Colon"
},
{
"type": "PreservedToken",
"span": {
"start": 38,
"end": 39,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 39,
"end": 42,
"ctxt": 0
},
"token": {
"Ident": {
"value": "red",
"raw": "red"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 42,
"end": 43,
"ctxt": 0
},
"token": "Semi"
}
]
}
]
}

View File

@ -0,0 +1,12 @@
error: Invalid selector
--> $DIR/tests/recovery/at-rule/extra-semi/input.css:1:17
|
1 | @import "x.css";;
| ^
error: Unexpected character `';'`
--> $DIR/tests/recovery/at-rule/extra-semi/input.css:1:17
|
1 | @import "x.css";;
| ^

View File

@ -1 +0,0 @@
@import nourl(test.css);

View File

@ -1,4 +1,4 @@
error: Expected string, url or function
error: Expected string, url or function token
--> $DIR/tests/recovery/at-rule/import/empty/input.css:1:9
|
1 | @import ;

View File

@ -1,4 +1,4 @@
error: Expected string, url or function
error: Expected string, url or function token
--> $DIR/tests/recovery/at-rule/import/indent/input.css:1:9
|
1 | @import foo-bar;

View File

@ -0,0 +1,2 @@
@import nourl(test);
@import 123;

View File

@ -0,0 +1,123 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 34,
"ctxt": 0
},
"rules": [
{
"type": "UnknownAtRule",
"span": {
"start": 0,
"end": 20,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 1,
"end": 7,
"ctxt": 0
},
"value": "import",
"raw": "import"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "Function",
"span": {
"start": 8,
"end": 19,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 8,
"end": 13,
"ctxt": 0
},
"value": "nourl",
"raw": "nourl"
},
"value": [
{
"type": "Ident",
"span": {
"start": 14,
"end": 18,
"ctxt": 0
},
"value": "test",
"raw": "test"
}
]
}
],
"block": null
},
{
"type": "UnknownAtRule",
"span": {
"start": 21,
"end": 33,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 22,
"end": 28,
"ctxt": 0
},
"value": "import",
"raw": "import"
},
"prelude": [
{
"type": "PreservedToken",
"span": {
"start": 28,
"end": 29,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 29,
"end": 32,
"ctxt": 0
},
"token": {
"Number": {
"value": 123.0,
"raw": "123",
"type": "integer"
}
}
}
],
"block": null
}
]
}

View File

@ -0,0 +1,12 @@
error: Expected 'url' or 'src' name of a function token
--> $DIR/tests/recovery/at-rule/import/no-url/input.css:1:9
|
1 | @import nourl(test);
| ^^^^^^
error: Expected string, url or function token
--> $DIR/tests/recovery/at-rule/import/no-url/input.css:2:9
|
2 | @import 123;
| ^^^

View File

@ -0,0 +1,10 @@
<!-- 123 -->
div {
color: red;
<!--
test
-->
}

View File

@ -0,0 +1,228 @@
{
"type": "Stylesheet",
"span": {
"start": 0,
"end": 54,
"ctxt": 0
},
"rules": [
{
"type": "QualifiedRule",
"span": {
"start": 5,
"end": 53,
"ctxt": 0
},
"prelude": {
"type": "Tokens",
"span": {
"start": 5,
"end": 18,
"ctxt": 0
},
"tokens": [
{
"type": "PreservedToken",
"span": {
"start": 5,
"end": 8,
"ctxt": 0
},
"token": {
"Number": {
"value": 123.0,
"raw": "123",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 8,
"end": 9,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"token": "CDC"
},
{
"type": "PreservedToken",
"span": {
"start": 12,
"end": 14,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n\n"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 14,
"end": 17,
"ctxt": 0
},
"token": {
"Ident": {
"value": "div",
"raw": "div"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
},
"block": {
"type": "SimpleBlock",
"span": {
"start": 18,
"end": 53,
"ctxt": 0
},
"name": "{",
"value": [
{
"type": "Declaration",
"span": {
"start": 24,
"end": 34,
"ctxt": 0
},
"name": {
"type": "Ident",
"span": {
"start": 24,
"end": 29,
"ctxt": 0
},
"value": "color",
"raw": "color"
},
"value": [
{
"type": "Ident",
"span": {
"start": 31,
"end": 34,
"ctxt": 0
},
"value": "red",
"raw": "red"
}
],
"important": null
},
{
"type": "Tokens",
"span": {
"start": 36,
"end": 52,
"ctxt": 0
},
"tokens": [
{
"type": "PreservedToken",
"span": {
"start": 36,
"end": 40,
"ctxt": 0
},
"token": "CDO"
},
{
"type": "PreservedToken",
"span": {
"start": 40,
"end": 42,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n\n"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 42,
"end": 46,
"ctxt": 0
},
"token": {
"Ident": {
"value": "test",
"raw": "test"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 46,
"end": 48,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n\n"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 48,
"end": 51,
"ctxt": 0
},
"token": "CDC"
},
{
"type": "PreservedToken",
"span": {
"start": 51,
"end": 52,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": "\n"
}
}
}
]
}
]
}
}
]
}

View File

@ -0,0 +1,12 @@
error: Invalid selector
--> $DIR/tests/recovery/cdo-and-cdc/input.css:1:6
|
1 | <!-- 123 -->
| ^
error: Expected whitespace, semicolon, EOF, at-keyword or ident token
--> $DIR/tests/recovery/cdo-and-cdc/input.css:5:1
|
5 | <!--
| ^^^^