feat(css/parser): Improve error recovery for unknown at-rules (#4257)

This commit is contained in:
Alexander Akait 2022-04-06 08:07:48 +03:00 committed by GitHub
parent b72ec7b53b
commit 8b6647cf85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 4379 additions and 2311 deletions

View File

@ -15,4 +15,4 @@
@unknown x ( a + b ) ;
@unknown x ( a - b ) ;
@unknown x ( a , b ) ;
@unknown x(a, b) ;
@unknown x( a , b ) ;

View File

@ -1 +1 @@
@unknown {}@unknown url(image.png) {}@unknown url( image.png ) {}@unknown url("image.png") {}@unknown url( image.png img ) {}@unknown url( image.png"" img ) {}@unknown url( image.png\ img ) {}@unknown url( image.png\) ) {}@unknown;@unknown x;@unknown x{}@unknown x {}@unknown{}@unknown{a: b; c: d;}@unknown x ( a + b ) ;@unknown x ( a - b ) ;@unknown x ( a , b ) ;@unknown x(a,b) ;
@unknown {}@unknown url(image.png) {}@unknown url( image.png ) {}@unknown url("image.png") {}@unknown url( image.png img ) {}@unknown url( image.png"" img ) {}@unknown url( image.png\ img ) {}@unknown url( image.png\) ) {}@unknown;@unknown x;@unknown x{}@unknown x {}@unknown{}@unknown{a: b; c: d;}@unknown x ( a + b ) ;@unknown x ( a - b ) ;@unknown x ( a , b ) ;@unknown x( a , b ) ;

View File

@ -408,7 +408,15 @@ where
Token::Function { value, .. }
if *value.to_ascii_lowercase() == *"layer" =>
{
let name = ImportPreludeLayerName::Function(parser.parse()?);
// TODO improve me
let ctx = Ctx {
block_contents_grammar: BlockContentsGrammar::DeclarationValue,
..parser.ctx
};
let name = ImportPreludeLayerName::Function(
parser.with_ctx(ctx).parse_as::<Function>()?,
);
parser.input.skip_ws()?;
@ -679,7 +687,12 @@ where
}
};
let component_value = self.parse()?;
let ctx = Ctx {
block_contents_grammar: BlockContentsGrammar::NoGrammar,
..self.ctx
};
let component_value =
self.with_ctx(ctx).parse_as::<ComponentValue>()?;
list_of_component_value.children.push(component_value);
list_of_component_value.span = Span::new(
@ -999,7 +1012,9 @@ where
Ok(SupportsFeature::Declaration(declaration))
}
Token::Function { value, .. } if &*value.to_lowercase() == "selector" => {
// TODO improve me
let ctx = Ctx {
block_contents_grammar: BlockContentsGrammar::DeclarationValue,
in_supports_at_rule: true,
..self.ctx
};
@ -1064,7 +1079,15 @@ where
{
Ok(DocumentPreludeMatchingFunction::Url(self.parse()?))
} else {
Ok(DocumentPreludeMatchingFunction::Function(self.parse()?))
// TODO improve me
let ctx = Ctx {
block_contents_grammar: BlockContentsGrammar::DeclarationValue,
..self.ctx
};
let function = self.with_ctx(ctx).parse_as::<Function>()?;
Ok(DocumentPreludeMatchingFunction::Function(function))
}
}
_ => {

View File

@ -499,7 +499,33 @@ where
{
fn parse(&mut self) -> PResult<ComponentValue> {
match self.ctx.block_contents_grammar {
BlockContentsGrammar::DeclarationValue => {
BlockContentsGrammar::NoGrammar => {
// Consume the next input token.
match cur!(self) {
// If the current input token is a <{-token>, <[-token>, or <(-token>, consume a
// simple block and return it.
tok!("[") | tok!("(") | tok!("{") => {
let block = self.parse()?;
Ok(ComponentValue::SimpleBlock(block))
}
// Otherwise, if the current input token is a <function-token>, consume a
// function and return it.
tok!("function") => Ok(ComponentValue::Function(self.parse()?)),
// Otherwise, return the current input token.
_ => {
let token = self.input.bump()?;
match token {
Some(t) => Ok(ComponentValue::PreservedToken(t)),
_ => {
unreachable!();
}
}
}
}
}
_ => {
// TODO refactor me
self.input.skip_ws()?;
@ -576,36 +602,6 @@ where
Err(Error::new(span, ErrorKind::Expected("Declaration value")))
}
_ => {
// Consume the next input token.
match cur!(self) {
// If the current input token is a <{-token>, <[-token>, or <(-token>, consume a
// simple block and return it.
tok!("[") | tok!("(") | tok!("{") => {
let ctx = Ctx {
block_contents_grammar: BlockContentsGrammar::NoGrammar,
..self.ctx
};
let block = self.with_ctx(ctx).parse_as::<SimpleBlock>()?;
Ok(ComponentValue::SimpleBlock(block))
}
// Otherwise, if the current input token is a <function-token>, consume a
// function and return it.
tok!("function") => Ok(ComponentValue::Function(self.parse()?)),
// Otherwise, return the current input token.
_ => {
let token = self.input.bump()?;
match token {
Some(t) => Ok(ComponentValue::PreservedToken(t)),
_ => {
unreachable!();
}
}
}
}
}
}
}
}

View File

@ -2318,22 +2318,34 @@ where
// anything else
// Reconsume the current input token. Consume a component value and append the
// returned value to the functions value.
_ => {
let state = self.input.state();
let values = self.parse_function_values(function_name);
_ => match self.ctx.block_contents_grammar {
BlockContentsGrammar::NoGrammar => {
let ctx = Ctx {
block_contents_grammar: BlockContentsGrammar::NoGrammar,
..self.ctx
};
match values {
Ok(values) => {
function.value.extend(values);
}
Err(err) => {
self.errors.push(err);
self.input.reset(&state);
let component_value = self.with_ctx(ctx).parse_as::<ComponentValue>()?;
function.value.push(self.parse()?);
function.value.push(component_value);
}
_ => {
let state = self.input.state();
let values = self.parse_function_values(function_name);
match values {
Ok(values) => {
function.value.extend(values);
}
Err(err) => {
self.errors.push(err);
self.input.reset(&state);
function.value.push(self.parse()?);
}
}
}
}
},
}
}

View File

@ -3972,14 +3972,18 @@
},
"value": [
{
"type": "String",
"type": "PreservedToken",
"span": {
"start": 1718,
"end": 1729,
"ctxt": 0
},
"value": ".minwidth",
"raw": "\".minwidth\""
"token": {
"String": {
"value": ".minwidth",
"raw": "\".minwidth\""
}
}
}
]
}
@ -4853,52 +4857,93 @@
},
"value": [
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2028,
"end": 2030,
"ctxt": 0
},
"value": 10,
"raw": "10"
"token": {
"Number": {
"value": 10.0,
"raw": "10",
"type": "integer"
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 2030,
"end": 2031,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2031,
"end": 2032,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2032,
"end": 2034,
"ctxt": 0
},
"value": 20,
"raw": "20"
"token": {
"Number": {
"value": 20.0,
"raw": "20",
"type": "integer"
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 2034,
"end": 2035,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2035,
"end": 2036,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2036,
"end": 2038,
"ctxt": 0
},
"value": 40,
"raw": "40"
"token": {
"Number": {
"value": 40.0,
"raw": "40",
"type": "integer"
}
}
}
]
}
@ -5057,52 +5102,93 @@
},
"value": [
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2088,
"end": 2090,
"ctxt": 0
},
"value": 10,
"raw": "10"
"token": {
"Number": {
"value": 10.0,
"raw": "10",
"type": "integer"
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 2090,
"end": 2091,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2091,
"end": 2092,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2092,
"end": 2094,
"ctxt": 0
},
"value": 20,
"raw": "20"
"token": {
"Number": {
"value": 20.0,
"raw": "20",
"type": "integer"
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 2094,
"end": 2095,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2095,
"end": 2096,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2096,
"end": 2098,
"ctxt": 0
},
"value": 40,
"raw": "40"
"token": {
"Number": {
"value": 40.0,
"raw": "40",
"type": "integer"
}
}
}
]
}
@ -5263,52 +5349,145 @@
},
"value": [
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2152,
"end": 2155,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2155,
"end": 2157,
"ctxt": 0
},
"value": 10,
"raw": "10"
"token": {
"Number": {
"value": 10.0,
"raw": "10",
"type": "integer"
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 2157,
"end": 2160,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2160,
"end": 2161,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2161,
"end": 2164,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2164,
"end": 2166,
"ctxt": 0
},
"value": 20,
"raw": "20"
"token": {
"Number": {
"value": 20.0,
"raw": "20",
"type": "integer"
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 2166,
"end": 2169,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2169,
"end": 2170,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 2170,
"end": 2173,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2173,
"end": 2175,
"ctxt": 0
},
"value": 40,
"raw": "40"
"token": {
"Number": {
"value": 40.0,
"raw": "40",
"type": "integer"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 2175,
"end": 2178,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
}

View File

@ -4749,7 +4749,7 @@
: ^^^^^^^^^^^
`----
x Str
x String { value: Atom('.minwidth' type=dynamic), raw: Atom('".minwidth"' type=dynamic) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:51:1]
51 | @supports (--element(".minwidth")) {
: ^^^^^^^^^^^
@ -5706,7 +5706,7 @@
: ^^
`----
x Integer
x Number { value: 10.0, raw: Atom('10' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^^
@ -5718,19 +5718,31 @@
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^^
`----
x Integer
x Number { value: 20.0, raw: Atom('20' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^^
@ -5742,19 +5754,31 @@
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^^
`----
x Integer
x Number { value: 40.0, raw: Atom('40' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:73:1]
73 | @supports func(10, 20, 40) {
: ^^
@ -5931,7 +5955,7 @@
: ^^
`----
x Integer
x Number { value: 10.0, raw: Atom('10' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^^
@ -5943,19 +5967,31 @@
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^^
`----
x Integer
x Number { value: 20.0, raw: Atom('20' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^^
@ -5967,19 +6003,31 @@
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^^
`----
x Integer
x Number { value: 40.0, raw: Atom('40' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:77:1]
77 | @supports (func(10, 20, 40)) {
: ^^
@ -6150,49 +6198,97 @@
: ^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
`----
x Integer
x Number { value: 10.0, raw: Atom('10' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
`----
x Integer
x Number { value: 20.0, raw: Atom('20' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^
@ -6201,15 +6297,39 @@
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
: ^^^
`----
x Integer
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
`----
x Number { value: 40.0, raw: Atom('40' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | @supports ( func( 10 , 20 , 40 ) ) {
: ^^^
`----
x SimpleBlock
,-[$DIR/tests/fixture/at-rule/supports/input.css:81:1]
81 | ,-> @supports ( func( 10 , 20 , 40 ) ) {

View File

@ -2,8 +2,8 @@
@unknown x y;
@unknown "blah";
@unknown \"blah\";
/*@unknown!*test*!;*/
/*@unknown!*test*!x!*test*! y;*/
@unknown /*test*/;
@unknown /*test*/x/*test*/ y;
@unknown ;
@unknown x y;
@ -15,11 +15,11 @@
@unknown x, y x(1) {p:v}
@unknown x, y x(1+2) {p:v}
@unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
/*@unknown!*test*!x!*test*! y!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
/*@unknown!*test*!x!*test*!,!*test*!y!*test*! x(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
@unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
/*@unknown !*test*!x!*test*!,!*test*!y!*test*! x(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
@unknown { p : v }
@unknown x y { p : v }
/*@unknown x , y x( 1 + 2 ) { p : v }*/
@unknown x , y x( 1 + 2 ) { p : v }
@unknown {s{p:v}}
@unknown x y {s{p:v}}
@ -27,8 +27,8 @@
@unknown x, y f(1+2) {s{p:v}}
@unknown { .a { p: v; } .b { p: v } }
@unknown/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
/*@unknown!*test*!x!*test*! y!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
/*@unknown!*test*!x!*test*!,!*test*!y!*test*! f(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
@unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
/*@unknown !*test*!x!*test*!,!*test*!y!*test*! f(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
@unknown { s { p : v } }
@unknown x y { s { p : v } }
@unknown x , y f( 1 ) { s { p : v } }

File diff suppressed because it is too large Load Diff

View File

@ -5,8 +5,8 @@
2 | | @unknown x y;
3 | | @unknown "blah";
4 | | @unknown \"blah\";
5 | | /*@unknown!*test*!;*/
6 | | /*@unknown!*test*!x!*test*! y;*/
5 | | @unknown /*test*/;
6 | | @unknown /*test*/x/*test*/ y;
7 | | @unknown ;
8 | | @unknown x y;
9 | |
@ -18,11 +18,11 @@
15 | | @unknown x, y x(1) {p:v}
16 | | @unknown x, y x(1+2) {p:v}
17 | | @unknown/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
18 | | /*@unknown!*test*!x!*test*! y!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
19 | | /*@unknown!*test*!x!*test*!,!*test*!y!*test*! x(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
18 | | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
19 | | /*@unknown !*test*!x!*test*!,!*test*!y!*test*! x(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}*/
20 | | @unknown { p : v }
21 | | @unknown x y { p : v }
22 | | /*@unknown x , y x( 1 + 2 ) { p : v }*/
22 | | @unknown x , y x( 1 + 2 ) { p : v }
23 | |
24 | | @unknown {s{p:v}}
25 | | @unknown x y {s{p:v}}
@ -30,8 +30,8 @@
27 | | @unknown x, y f(1+2) {s{p:v}}
28 | | @unknown { .a { p: v; } .b { p: v } }
29 | | @unknown/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
30 | | /*@unknown!*test*!x!*test*! y!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
31 | | /*@unknown!*test*!x!*test*!,!*test*!y!*test*! f(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
30 | | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
31 | | /*@unknown !*test*!x!*test*!,!*test*!y!*test*! f(!*test*!1!*test*!+!*test*!2!*test*!)!*test*!{!*test*!s!*test*!{!*test*!p!*test*!:!*test*!v!*test*!}!*test*!}*/
32 | | @unknown { s { p : v } }
33 | | @unknown x y { s { p : v } }
34 | | @unknown x , y f( 1 ) { s { p : v } }
@ -260,6 +260,114 @@
: ^^^^^^^^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:5:1]
5 | @unknown /*test*/;
: ^^^^^^^^^^^^^^^^^^
`----
x AtRule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:5:1]
5 | @unknown /*test*/;
: ^^^^^^^^^^^^^^^^^^
`----
x AtRuleName
,-[$DIR/tests/fixture/at-rule/unknown/input.css:5:1]
5 | @unknown /*test*/;
: ^^^^^^^
`----
x Ident
,-[$DIR/tests/fixture/at-rule/unknown/input.css:5:1]
5 | @unknown /*test*/;
: ^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:5:1]
5 | @unknown /*test*/;
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:5:1]
5 | @unknown /*test*/;
: ^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRuleName
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^^^^^^^
`----
x Ident
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x Ident { value: Atom('y' type=inline), raw: Atom('y' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:6:1]
6 | @unknown /*test*/x/*test*/ y;
: ^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:7:1]
7 | @unknown ;
@ -866,7 +974,7 @@
: ^
`----
x Integer
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:15:1]
15 | @unknown x, y x(1) {p:v}
: ^
@ -1046,7 +1154,7 @@
: ^
`----
x Integer
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:16:1]
16 | @unknown x, y x(1+2) {p:v}
: ^
@ -1058,7 +1166,7 @@
: ^^
`----
x Integer
x Number { value: 2.0, raw: Atom('+2' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:16:1]
16 | @unknown x, y x(1+2) {p:v}
: ^^
@ -1184,6 +1292,120 @@
: ^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRuleName
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^^^^^^^
`----
x Ident
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x Ident { value: Atom('y' type=inline), raw: Atom('y' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x SimpleBlock
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x Ident { value: Atom('p' type=inline), raw: Atom('p' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x Colon
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x Ident { value: Atom('v' type=inline), raw: Atom('v' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:18:1]
18 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}
: ^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:20:1]
20 | @unknown { p : v }
@ -1484,6 +1706,318 @@
: ^^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRuleName
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^
`----
x Ident
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Comma
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Ident { value: Atom('y' type=inline), raw: Atom('y' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^^^^^^^^
`----
x Function
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^^^^^^^^
`----
x Ident
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Delim { value: '+' }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x SimpleBlock
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^^^^^^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Ident { value: Atom('p' type=inline), raw: Atom('p' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Colon
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x Ident { value: Atom('v' type=inline), raw: Atom('v' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:22:1]
22 | @unknown x , y x( 1 + 2 ) { p : v }
: ^^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:24:1]
24 | @unknown {s{p:v}}
@ -1856,7 +2390,7 @@
: ^
`----
x Integer
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:26:1]
26 | @unknown x, y f(1) {s{p:v}}
: ^
@ -2060,7 +2594,7 @@
: ^
`----
x Integer
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:27:1]
27 | @unknown x, y f(1+2) {s{p:v}}
: ^
@ -2072,7 +2606,7 @@
: ^^
`----
x Integer
x Number { value: 2.0, raw: Atom('+2' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:27:1]
27 | @unknown x, y f(1+2) {s{p:v}}
: ^^
@ -2576,6 +3110,144 @@
: ^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x AtRuleName
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^
`----
x Ident
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Ident { value: Atom('x' type=inline), raw: Atom('x' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Ident { value: Atom('y' type=inline), raw: Atom('y' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x SimpleBlock
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Ident { value: Atom('s' type=inline), raw: Atom('s' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x SimpleBlock
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Ident { value: Atom('p' type=inline), raw: Atom('p' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Colon
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Ident { value: Atom('v' type=inline), raw: Atom('v' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:30:1]
30 | @unknown /*test*/x/*test*/ y/*test*/{/*test*/s/*test*/{/*test*/p/*test*/:/*test*/v/*test*/}/*test*/}
: ^
`----
x Rule
,-[$DIR/tests/fixture/at-rule/unknown/input.css:32:1]
32 | @unknown { s { p : v } }
@ -3125,15 +3797,39 @@
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
: ^
: ^^
`----
x Integer
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
: ^
`----
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:34:1]
34 | @unknown x , y f( 1 ) { s { p : v } }
@ -3422,13 +4118,25 @@
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^
`----
x Integer
x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^
@ -3437,15 +4145,39 @@
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^
: ^^^^
`----
x Integer
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^^^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^
`----
x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
: ^^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:35:1]
35 | @unknown x , y f( 1 2 ) { s { p : v } }
@ -4870,13 +5602,25 @@
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x Ident
x Ident { value: Atom('a' type=inline), raw: Atom('a' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
@ -4888,7 +5632,7 @@
: ^
`----
x Delimiter
x Comma
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
@ -4897,15 +5641,39 @@
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
: ^
`----
x Ident
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x Ident { value: Atom('b' type=inline), raw: Atom('b' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x WhiteSpace { value: Atom(' ' type=inline) }
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }
: ^
`----
x ComponentValue
,-[$DIR/tests/fixture/at-rule/unknown/input.css:60:1]
60 | @unknown x( a, b ) { foo: bar }

View File

@ -63,14 +63,18 @@
},
"value": [
{
"type": "String",
"type": "PreservedToken",
"span": {
"start": 12,
"end": 21,
"ctxt": 0
},
"value": "http://",
"raw": "'http://'"
"token": {
"String": {
"value": "http://",
"raw": "'http://'"
}
}
}
]
},

View File

@ -63,14 +63,18 @@
},
"value": [
{
"type": "Ident",
"type": "PreservedToken",
"span": {
"start": 14,
"end": 18,
"ctxt": 0
},
"value": "test",
"raw": "test"
"token": {
"Ident": {
"value": "test",
"raw": "test"
}
}
}
]
}

View File

@ -245,14 +245,32 @@
}
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": 2,
"raw": "2"
"token": {
"Number": {
"value": 2.0,
"raw": "2",
"type": "integer"
}
}
}
]
}

View File

@ -245,14 +245,32 @@
}
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 54,
"end": 55,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 55,
"end": 56,
"ctxt": 0
},
"value": 2,
"raw": "2"
"token": {
"Number": {
"value": 2.0,
"raw": "2",
"type": "integer"
}
}
}
]
}

View File

@ -157,14 +157,32 @@
}
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 25,
"end": 26,
"ctxt": 0
},
"value": 2,
"raw": "2"
"token": {
"Number": {
"value": 2.0,
"raw": "2",
"type": "integer"
}
}
}
]
}
@ -235,14 +253,18 @@
}
},
{
"type": "Ident",
"type": "PreservedToken",
"span": {
"start": 50,
"end": 55,
"ctxt": 0
},
"value": "ident",
"raw": "ident"
"token": {
"Ident": {
"value": "ident",
"raw": "ident"
}
}
}
]
}
@ -326,14 +348,31 @@
}
},
{
"type": "Ident",
"type": "PreservedToken",
"span": {
"start": 83,
"end": 88,
"ctxt": 0
},
"value": "ident",
"raw": "ident"
"token": {
"Ident": {
"value": "ident",
"raw": "ident"
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 88,
"end": 91,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
}
]
}

View File

@ -5,12 +5,6 @@
: ^
`----
x Unexpected end of file
,-[$DIR/tests/recovery/function/unclosed-2/input.css:3:3]
3 |
: ^
`----
x Unexpected end of file
,-[$DIR/tests/recovery/function/unclosed-2/input.css:1:1]
1 | .style {

View File

@ -109,52 +109,21 @@
},
"value": [
{
"type": "CalcSum",
"type": "PreservedToken",
"span": {
"start": 21,
"end": 26,
"ctxt": 0
},
"expressions": [
{
"type": "CalcProduct",
"span": {
"start": 21,
"end": 26,
"ctxt": 0
},
"expressions": [
{
"type": "Length",
"span": {
"start": 21,
"end": 26,
"ctxt": 0
},
"value": {
"type": "Number",
"span": {
"start": 21,
"end": 24,
"ctxt": 0
},
"value": 500.0,
"raw": "500"
},
"unit": {
"type": "Ident",
"span": {
"start": 24,
"end": 26,
"ctxt": 0
},
"value": "px",
"raw": "px"
}
}
]
"token": {
"Dimension": {
"value": 500.0,
"raw_value": "500",
"unit": "px",
"raw_unit": "px",
"type": "integer"
}
]
}
},
{
"type": "PreservedToken",

View File

@ -17,12 +17,6 @@
: ^
`----
x Unexpected end of file
,-[$DIR/tests/recovery/function/unclosed/input.css:3:3]
3 |
: ^
`----
x Unexpected end of file
,-[$DIR/tests/recovery/function/unclosed/input.css:1:1]
1 | .style {

View File

@ -308,14 +308,19 @@
}
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 117,
"end": 118,
"ctxt": 0
},
"value": 0,
"raw": "0"
"token": {
"Number": {
"value": 0.0,
"raw": "0",
"type": "integer"
}
}
}
]
}
@ -451,14 +456,19 @@
}
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 184,
"end": 185,
"ctxt": 0
},
"value": 2,
"raw": "2"
"token": {
"Number": {
"value": 2.0,
"raw": "2",
"type": "integer"
}
}
}
]
},
@ -573,14 +583,19 @@
}
},
{
"type": "Integer",
"type": "PreservedToken",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": 3,
"raw": "3"
"token": {
"Number": {
"value": 3.0,
"raw": "3",
"type": "integer"
}
}
}
]
}

View File

@ -23,18 +23,6 @@
: ^
`----
x Expected Declaration value
,-[$DIR/tests/recovery/ie-progid/input.css:2:5]
2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0);
: ^
`----
x Expected Declaration value
,-[$DIR/tests/recovery/ie-progid/input.css:2:5]
2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0);
: ^
`----
x Expected Declaration value
,-[$DIR/tests/recovery/ie-progid/input.css:3:5]
3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3);

View File

@ -719,33 +719,54 @@
},
"value": [
{
"type": "String",
"type": "PreservedToken",
"span": {
"start": 382,
"end": 387,
"ctxt": 0
},
"value": "foo",
"raw": "\"foo\""
"token": {
"String": {
"value": "foo",
"raw": "\"foo\""
}
}
},
{
"type": "Delimiter",
"type": "PreservedToken",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"value": ","
"token": "Comma"
},
{
"type": "String",
"type": "PreservedToken",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"token": {
"WhiteSpace": {
"value": " "
}
}
},
{
"type": "PreservedToken",
"span": {
"start": 389,
"end": 394,
"ctxt": 0
},
"value": "bar",
"raw": "\"bar\""
"token": {
"String": {
"value": "bar",
"raw": "\"bar\""
}
}
}
]
}

View File

@ -16,9 +16,3 @@
4 | margin: 0 calc(__styled-jsx-placeholder__7vw - __styled-jsx-placeholder__7px);
: ^
`----
x Expected 'e', 'pi', 'infinity', '-infinity' or 'NaN', ident tokens
,-[$DIR/tests/recovery/vercel/002/input.css:4:5]
4 | margin: 0 calc(__styled-jsx-placeholder__7vw - __styled-jsx-placeholder__7px);
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`----