From c94735e540e7a5995d912761df7b68e8b70dce2c Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Sat, 27 Nov 2021 19:11:40 +0300 Subject: [PATCH] fix(css): Handle custom properties properly (#2869) swc_css_codegen: - Fix code generation of custom properties. swc_css_parser: - Fix parsing of custom properties. --- crates/swc_css_codegen/src/lib.rs | 23 +- crates/swc_css_parser/src/macros.rs | 8 + .../swc_css_parser/src/parser/selector/mod.rs | 6 +- .../swc_css_parser/src/parser/style_rule.rs | 42 +- crates/swc_css_parser/src/parser/value/mod.rs | 218 +- .../custom-properties/exclamation/input.css | 1 + .../exclamation/output.stderr | 6 + .../tests/errors/custom-properties/input.css | 3 - .../errors/custom-properties/output.stderr | 12 - crates/swc_css_parser/tests/fixture.rs | 68 - .../rome/custom-properties/output.json | 1011 +++-- .../rome/custom-properties/span.rust-debug | 542 ++- .../tests/fixture/rome/functions/output.json | 52 +- .../fixture/rome/functions/span.rust-debug | 24 +- .../selector/pseudo-class/unknown/input.css | 20 + .../selector/pseudo-class/unknown/output.json | 2109 ++++++++++ .../pseudo-class/unknown/span.rust-debug | 1512 +++++++ .../selector/pseudo-element/unknown/input.css | 20 +- .../pseudo-element/unknown/output.json | 2037 +++++++++- .../pseudo-element/unknown/span.rust-debug | 1492 ++++++- .../fixture/styled-jsx/selector/2/output.json | 4 +- .../styled-jsx/selector/2/span.rust-debug | 4 +- .../fixture/value/custom-property/input.css | 35 +- .../fixture/value/custom-property/output.json | 3492 ++++++++++++++--- .../value/custom-property/span.rust-debug | 2351 ++++++++--- .../fixture/value/square-brackets/input.css | 1 + .../fixture/value/square-brackets/output.json | 123 +- .../value/square-brackets/span.rust-debug | 192 +- 28 files changed, 13457 insertions(+), 1951 deletions(-) create mode 100644 crates/swc_css_parser/tests/errors/custom-properties/exclamation/input.css create mode 100644 crates/swc_css_parser/tests/errors/custom-properties/exclamation/output.stderr delete mode 100644 crates/swc_css_parser/tests/errors/custom-properties/input.css delete mode 100644 crates/swc_css_parser/tests/errors/custom-properties/output.stderr create mode 100644 crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/input.css create mode 100644 crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/output.json create mode 100644 crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/span.rust-debug diff --git a/crates/swc_css_codegen/src/lib.rs b/crates/swc_css_codegen/src/lib.rs index 9f7f17fb52b8..10816309d850 100644 --- a/crates/swc_css_codegen/src/lib.rs +++ b/crates/swc_css_codegen/src/lib.rs @@ -351,16 +351,27 @@ where fn emit_declaration(&mut self, n: &Declaration) -> Result { emit!(self, n.property); punct!(self, ":"); - formatting_space!(self); - self.emit_list( - &n.value, - ListFormat::SpaceDelimited | ListFormat::SingleLine, - )?; + let is_custom_property = n.property.value.starts_with("--"); - if let Some(tok) = n.important { + if !is_custom_property { formatting_space!(self); + } + + let format = match is_custom_property { + true => ListFormat::NotDelimited, + false => ListFormat::SpaceDelimited | ListFormat::SingleLine, + }; + + self.emit_list(&n.value, format)?; + + if let Some(tok) = n.important { + if !is_custom_property { + formatting_space!(self); + } + punct!(self, tok, "!"); + self.wr.write_raw(Some(tok), "important")?; } diff --git a/crates/swc_css_parser/src/macros.rs b/crates/swc_css_parser/src/macros.rs index cd4d9e0d96ab..3f4c4f66d7c8 100644 --- a/crates/swc_css_parser/src/macros.rs +++ b/crates/swc_css_parser/src/macros.rs @@ -12,6 +12,14 @@ macro_rules! tok { swc_css_ast::Token::Function { .. } }; + ("bad-string") => { + swc_css_ast::Token::BadStr { .. } + }; + + ("bad-url") => { + swc_css_ast::Token::BadUrl { .. } + }; + ("[") => { swc_css_ast::Token::LBracket }; diff --git a/crates/swc_css_parser/src/parser/selector/mod.rs b/crates/swc_css_parser/src/parser/selector/mod.rs index 0870118d98db..e0869f1730ce 100644 --- a/crates/swc_css_parser/src/parser/selector/mod.rs +++ b/crates/swc_css_parser/src/parser/selector/mod.rs @@ -713,11 +713,11 @@ where Err(_) => { self.input.reset(&state); - PseudoSelectorChildren::Tokens(self.parse_any_value(false)?) + PseudoSelectorChildren::Tokens(self.parse_any_value()?) } } } - _ => PseudoSelectorChildren::Tokens(self.parse_any_value(false)?), + _ => PseudoSelectorChildren::Tokens(self.parse_any_value()?), }; expect!(self, ")"); @@ -769,7 +769,7 @@ where _ => unreachable!(), }; - let children = self.parse_any_value(false)?; + let children = self.parse_any_value()?; expect!(self, ")"); diff --git a/crates/swc_css_parser/src/parser/style_rule.rs b/crates/swc_css_parser/src/parser/style_rule.rs index 2f09f7cac61a..e58280efb834 100644 --- a/crates/swc_css_parser/src/parser/style_rule.rs +++ b/crates/swc_css_parser/src/parser/style_rule.rs @@ -157,25 +157,35 @@ where self.input.skip_ws()?; - let property = self.parse()?; + let property: Ident = self.parse()?; self.input.skip_ws()?; expect!(self, ":"); - let mut value = vec![]; let mut end = self.input.cur_span()?.hi; + let mut value = vec![]; if !is!(self, EOF) { - let ctx = Ctx { - allow_operation_in_value: false, - recover_from_property_value: true, - ..self.ctx - }; - let (mut parsed_value, parsed_last_pos) = self.with_ctx(ctx).parse_property_values()?; + match &*property.value { + str if str.starts_with("--") => { + let tokens = Value::Lazy(self.parse_declaration_value()?); - value.append(&mut parsed_value); - end = parsed_last_pos; + value.push(tokens); + } + _ => { + let ctx = Ctx { + allow_operation_in_value: false, + recover_from_property_value: true, + ..self.ctx + }; + let (parsed_value, parsed_last_pos) = + self.with_ctx(ctx).parse_property_values()?; + + value.extend(parsed_value); + end = parsed_last_pos; + } + } } let important = self.parse_bang_important()?; @@ -229,21 +239,21 @@ where } } -impl Parse> for Parser +impl Parse> for Parser where I: ParserInput, { - fn parse(&mut self) -> PResult> { - self.parse_declaration_list() + fn parse(&mut self) -> PResult> { + self.parse_decl_block_items() } } -impl Parse> for Parser +impl Parse> for Parser where I: ParserInput, { - fn parse(&mut self) -> PResult> { - self.parse_decl_block_items() + fn parse(&mut self) -> PResult> { + self.parse_declaration_list() } } diff --git a/crates/swc_css_parser/src/parser/value/mod.rs b/crates/swc_css_parser/src/parser/value/mod.rs index baea578f2fe4..9e2606378395 100644 --- a/crates/swc_css_parser/src/parser/value/mod.rs +++ b/crates/swc_css_parser/src/parser/value/mod.rs @@ -127,54 +127,142 @@ where Ok(val) } - /// Parse value as tokens. - pub(super) fn parse_any_value(&mut self, terminate_on_semi: bool) -> PResult { + /// Parse value as . + pub(super) fn parse_declaration_value(&mut self) -> PResult { let start = self.input.cur_span()?.lo; let mut tokens = vec![]; + let mut balance_stack: Vec> = vec![]; + // The production matches any sequence of one or more + // tokens, so long as the sequence does not contain ... loop { - if is_one_of!(self, EOF, ")", "}", "]") { - break; - } - - if terminate_on_semi { - if is!(self, ";") { + match cur!(self) { + // ... , , + tok!("bad-string") | tok!("bad-url") => { break; } - } - let span = self.input.cur_span()?; + // ... unmatched <)-token>, <]-token>, or <}-token>, + tok!(")") | tok!("]") | tok!("}") => { + let value = match cur!(self) { + tok!(")") => ')', + tok!("]") => ']', + tok!("}") => '}', + _ => { + unreachable!(); + } + }; + + let balance_close_type = match balance_stack.pop() { + Some(v) => v, + None => None, + }; - macro_rules! try_group { - ($start:tt,$end:tt) => {{ - if is!(self, $start) { - tokens.push(TokenAndSpan { - span, - token: bump!(self), - }); - - tokens.extend(self.parse_any_value(false)?.tokens); - - if is!(self, $end) { - tokens.push(TokenAndSpan { - span, - token: bump!(self), - }); - } else { - break; + if Some(value) != balance_close_type { + break; + } + } + + tok!("function") | tok!("(") | tok!("[") | tok!("{") => { + let value = match cur!(self) { + tok!("function") | tok!("(") => ')', + tok!("[") => ']', + tok!("{") => '}', + _ => { + unreachable!(); } - continue; + }; + + balance_stack.push(Some(value)); + } + + // ... or top-level tokens + tok!(";") => { + if balance_stack.len() == 0 { + break; + } + } + + // ... or tokens with a value of "!" + tok!("!") => { + if balance_stack.len() == 0 { + break; } - }}; + } + + _ => {} } - try_group!("(", ")"); - try_group!("function", ")"); - try_group!("[", "]"); - try_group!("{", "}"); + let token = self.input.bump()?; + + match token { + Some(token) => tokens.push(token), + None => break, + } + } + + Ok(Tokens { + span: span!(self, start), + tokens, + }) + } + + /// Parse value as . + pub(super) fn parse_any_value(&mut self) -> PResult { + let start = self.input.cur_span()?.lo; + + let mut tokens = vec![]; + let mut balance_stack: Vec> = vec![]; + + // The production matches any sequence of one or more tokens, + // so long as the sequence ... + loop { + match cur!(self) { + // ... , , + tok!("bad-string") | tok!("bad-url") => { + break; + } + + // ... unmatched <)-token>, <]-token>, or <}-token>, + tok!(")") | tok!("]") | tok!("}") => { + let value = match cur!(self) { + tok!(")") => ')', + tok!("]") => ']', + tok!("}") => '}', + _ => { + unreachable!(); + } + }; + + let balance_close_type = match balance_stack.pop() { + Some(v) => v, + None => None, + }; + + if Some(value) != balance_close_type { + break; + } + } + + tok!("function") | tok!("(") | tok!("[") | tok!("{") => { + let value = match cur!(self) { + tok!("function") | tok!("(") => ')', + tok!("[") => ']', + tok!("{") => '}', + _ => { + unreachable!(); + } + }; + + balance_stack.push(Some(value)); + } + + _ => {} + } let token = self.input.bump()?; + match token { Some(token) => tokens.push(token), None => break, @@ -196,7 +284,7 @@ where Token::Num { .. } => return self.parse_numeric_value(), - Token::Function { .. } => return self.parse_value_ident_or_fn(), + Token::Function { .. } => return Ok(Value::Fn(self.parse()?)), Token::Percent { .. } => return self.parse_numeric_value(), @@ -409,54 +497,6 @@ where } } - fn parse_value_ident_or_fn(&mut self) -> PResult { - let span = self.input.cur_span()?; - - let mut is_fn = false; - let values = match bump!(self) { - Token::Ident { value, raw } => (value, raw), - Token::Function { value, raw } => { - is_fn = true; - - (value, raw) - } - _ => { - unreachable!() - } - }; - - let name = Ident { - span: if is_fn { - swc_common::Span::new(span.lo, span.hi - BytePos(1), Default::default()) - } else { - span - }, - value: values.0, - raw: values.1, - }; - - if eat!(self, "(") || is_fn { - let is_url = name.value.to_ascii_lowercase() == js_word!("url"); - let ctx = Ctx { - allow_operation_in_value: if is_url { false } else { true }, - allow_separating_value_with_space: if is_url { false } else { true }, - allow_separating_value_with_comma: false, - ..self.ctx - }; - let args = self.with_ctx(ctx).parse_comma_separated_value()?; - - expect!(self, ")"); - - return Ok(Value::Fn(FnValue { - span: span!(self, span.lo), - name, - args, - })); - } - - Ok(Value::Ident(name)) - } - /// Parse comma separated values. fn parse_comma_separated_value(&mut self) -> PResult> { let mut args = vec![]; @@ -487,7 +527,7 @@ where let ctx = Ctx { is_in_delimited_value: true, - allow_separating_value_with_space: true, + allow_separating_value_with_space: false, ..self.ctx }; @@ -658,25 +698,27 @@ where unreachable!() } }; + let name = Ident { span: swc_common::Span::new(span.lo, span.hi - BytePos(1), Default::default()), value: name.0, raw: name.1, }; - + let is_url = name.value.to_ascii_lowercase() == js_word!("url"); let ctx = Ctx { - allow_operation_in_value: true, - allow_separating_value_with_space: true, + allow_operation_in_value: if is_url { false } else { true }, + allow_separating_value_with_space: if is_url { false } else { true }, + allow_separating_value_with_comma: false, ..self.ctx }; let args = self.with_ctx(ctx).parse_comma_separated_value()?; expect!(self, ")"); - Ok(FnValue { + return Ok(FnValue { span: span!(self, span.lo), name, args, - }) + }); } } diff --git a/crates/swc_css_parser/tests/errors/custom-properties/exclamation/input.css b/crates/swc_css_parser/tests/errors/custom-properties/exclamation/input.css new file mode 100644 index 000000000000..3e5e98613a28 --- /dev/null +++ b/crates/swc_css_parser/tests/errors/custom-properties/exclamation/input.css @@ -0,0 +1 @@ +.class {--foo:!; } \ No newline at end of file diff --git a/crates/swc_css_parser/tests/errors/custom-properties/exclamation/output.stderr b/crates/swc_css_parser/tests/errors/custom-properties/exclamation/output.stderr new file mode 100644 index 000000000000..bc3bfdde9e7d --- /dev/null +++ b/crates/swc_css_parser/tests/errors/custom-properties/exclamation/output.stderr @@ -0,0 +1,6 @@ +error: Expected !important + --> $DIR/tests/errors/custom-properties/exclamation/input.css:1:15 + | +1 | .class {--foo:!; } + | ^^^ + diff --git a/crates/swc_css_parser/tests/errors/custom-properties/input.css b/crates/swc_css_parser/tests/errors/custom-properties/input.css deleted file mode 100644 index 67735c365181..000000000000 --- a/crates/swc_css_parser/tests/errors/custom-properties/input.css +++ /dev/null @@ -1,3 +0,0 @@ -:root { - --semicolon-not-top-level: (;); -} diff --git a/crates/swc_css_parser/tests/errors/custom-properties/output.stderr b/crates/swc_css_parser/tests/errors/custom-properties/output.stderr deleted file mode 100644 index b818bd2bec28..000000000000 --- a/crates/swc_css_parser/tests/errors/custom-properties/output.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: Expected "}" - --> $DIR/tests/errors/custom-properties/input.css:2:34 - | -2 | --semicolon-not-top-level: (;); - | ^ - -error: Expected ")" - --> $DIR/tests/errors/custom-properties/input.css:2:33 - | -2 | --semicolon-not-top-level: (;); - | ^ - diff --git a/crates/swc_css_parser/tests/fixture.rs b/crates/swc_css_parser/tests/fixture.rs index e608ab1c6658..1f9ef43e304f 100644 --- a/crates/swc_css_parser/tests/fixture.rs +++ b/crates/swc_css_parser/tests/fixture.rs @@ -10,72 +10,6 @@ use swc_css_parser::{ use swc_css_visit::{Node, Visit, VisitWith}; use testing::NormalizedOutput; -struct AssertValid; - -impl Visit for AssertValid { - fn visit_pseudo_element_selector(&mut self, s: &PseudoElementSelector, _: &dyn Node) { - if let Some(tokens) = &s.children { - if tokens.tokens.is_empty() { - return; - } - - match &tokens.tokens[0].token { - Token::Colon | Token::Num { .. } => return, - _ => {} - } - - let mut errors = vec![]; - - let _selectors: SelectorList = parse_tokens( - &tokens, - ParserConfig { - parse_values: true, - - ..Default::default() - }, - &mut errors, - ) - .unwrap_or_else(|err| panic!("failed to parse tokens: {:?}\n{:?}", err, s.children)); - - for err in errors { - panic!("{:?}", err); - } - } - } - - fn visit_pseudo_class_selector(&mut self, s: &PseudoClassSelector, _: &dyn Node) { - s.visit_children_with(self); - - if let Some(PseudoSelectorChildren::Tokens(args)) = &s.children { - if args.tokens.is_empty() { - return; - } - - match &args.tokens[0].token { - Token::Colon | Token::Num { .. } => return, - _ => {} - } - - let mut errors = vec![]; - - let _selectors: SelectorList = parse_tokens( - &args, - ParserConfig { - parse_values: true, - - ..Default::default() - }, - &mut errors, - ) - .unwrap_or_else(|err| panic!("failed to parse tokens: {:?}\n{:?}", err, s.children)); - - for err in errors { - panic!("{:?}", err); - } - } - } -} - #[testing::fixture("tests/fixture/**/input.css")] fn tokens_input(input: PathBuf) { testing::run_test2(false, |cm, handler| { @@ -111,8 +45,6 @@ fn tokens_input(input: PathBuf) { err.to_diagnostics(&handler).emit(); } - ss.visit_with(&Invalid { span: DUMMY_SP }, &mut AssertValid); - if handler.has_errors() { return Err(()); } diff --git a/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json b/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json index 9561ac2c0171..f76bbc21f602 100644 --- a/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json +++ b/crates/swc_css_parser/tests/fixture/rome/custom-properties/output.json @@ -75,7 +75,7 @@ "type": "Declaration", "span": { "start": 10, - "end": 22, + "end": 17, "ctxt": 0 }, "property": { @@ -90,14 +90,39 @@ }, "value": [ { - "type": "String", + "type": "Tokens", "span": { - "start": 17, + "start": 16, "end": 22, "ctxt": 0 }, - "value": "bar", - "raw": "'bar'" + "tokens": [ + { + "span": { + "start": 16, + "end": 17, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 17, + "end": 22, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "bar", + "raw": "'bar'" + } + } + } + ] } ], "important": null @@ -106,7 +131,7 @@ "type": "Declaration", "span": { "start": 25, - "end": 44, + "end": 39, "ctxt": 0 }, "property": { @@ -121,14 +146,39 @@ }, "value": [ { - "type": "String", + "type": "Tokens", "span": { - "start": 39, + "start": 38, "end": 44, "ctxt": 0 }, - "value": "foo", - "raw": "\"foo\"" + "tokens": [ + { + "span": { + "start": 38, + "end": 39, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 39, + "end": 44, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "foo", + "raw": "\"foo\"" + } + } + } + ] } ], "important": null @@ -137,7 +187,7 @@ "type": "Declaration", "span": { "start": 47, - "end": 63, + "end": 56, "ctxt": 0 }, "property": { @@ -152,14 +202,39 @@ }, "value": [ { - "type": "String", + "type": "Tokens", "span": { - "start": 56, + "start": 55, "end": 63, "ctxt": 0 }, - "value": "abort", - "raw": "\"abort\"" + "tokens": [ + { + "span": { + "start": 55, + "end": 56, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 56, + "end": 63, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "abort", + "raw": "\"abort\"" + } + } + } + ] } ], "important": null @@ -168,7 +243,7 @@ "type": "Declaration", "span": { "start": 66, - "end": 78, + "end": 74, "ctxt": 0 }, "property": { @@ -183,14 +258,39 @@ }, "value": [ { - "type": "Number", + "type": "Tokens", "span": { - "start": 74, + "start": 73, "end": 78, "ctxt": 0 }, - "value": 1987.0, - "raw": "1987" + "tokens": [ + { + "span": { + "start": 73, + "end": 74, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 74, + "end": 78, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1987.0, + "raw": "1987" + } + } + } + ] } ], "important": null @@ -199,7 +299,7 @@ "type": "Declaration", "span": { "start": 81, - "end": 98, + "end": 95, "ctxt": 0 }, "property": { @@ -214,22 +314,39 @@ }, "value": [ { - "type": "PercentValue", + "type": "Tokens", "span": { - "start": 95, + "start": 94, "end": 98, "ctxt": 0 }, - "value": { - "type": "Number", - "span": { - "start": 95, - "end": 97, - "ctxt": 0 - }, - "value": 25.0, - "raw": "25" - } + "tokens": [ + { + "span": { + "start": 94, + "end": 95, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 95, + "end": 98, + "ctxt": 0 + }, + "token": { + "Percent": { + "value": 25.0, + "raw": "25" + } + } + } + ] } ], "important": null @@ -238,7 +355,7 @@ "type": "Declaration", "span": { "start": 101, - "end": 113, + "end": 111, "ctxt": 0 }, "property": { @@ -253,14 +370,39 @@ }, "value": [ { - "type": "Number", + "type": "Tokens", "span": { - "start": 111, + "start": 110, "end": 113, "ctxt": 0 }, - "value": 37.0, - "raw": "37" + "tokens": [ + { + "span": { + "start": 110, + "end": 111, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 111, + "end": 113, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 37.0, + "raw": "37" + } + } + } + ] } ], "important": null @@ -269,7 +411,7 @@ "type": "Declaration", "span": { "start": 116, - "end": 130, + "end": 126, "ctxt": 0 }, "property": { @@ -284,31 +426,41 @@ }, "value": [ { - "type": "UnitValue", + "type": "Tokens", "span": { - "start": 126, + "start": 125, "end": 130, "ctxt": 0 }, - "value": { - "type": "Number", - "span": { - "start": 126, - "end": 128, - "ctxt": 0 - }, - "value": 12.0, - "raw": "12" - }, - "unit": { - "span": { - "start": 128, - "end": 130, - "ctxt": 0 - }, - "value": "em", - "raw": "em" - } + "tokens": [ + { + "span": { + "start": 125, + "end": 126, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 126, + "end": 130, + "ctxt": 0 + }, + "token": { + "Dimension": { + "value": 12.0, + "raw_value": "12", + "unit": "em", + "raw_unit": "em" + } + } + } + ] } ], "important": null @@ -317,7 +469,7 @@ "type": "Declaration", "span": { "start": 133, - "end": 145, + "end": 141, "ctxt": 0 }, "property": { @@ -332,31 +484,41 @@ }, "value": [ { - "type": "UnitValue", + "type": "Tokens", "span": { - "start": 141, + "start": 140, "end": 145, "ctxt": 0 }, - "value": { - "type": "Number", - "span": { - "start": 141, - "end": 143, - "ctxt": 0 - }, - "value": 75.0, - "raw": "75" - }, - "unit": { - "span": { - "start": 143, - "end": 145, - "ctxt": 0 - }, - "value": "ms", - "raw": "ms" - } + "tokens": [ + { + "span": { + "start": 140, + "end": 141, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 141, + "end": 145, + "ctxt": 0 + }, + "token": { + "Dimension": { + "value": 75.0, + "raw_value": "75", + "unit": "ms", + "raw_unit": "ms" + } + } + } + ] } ], "important": null @@ -365,7 +527,7 @@ "type": "Declaration", "span": { "start": 148, - "end": 165, + "end": 160, "ctxt": 0 }, "property": { @@ -380,23 +542,47 @@ }, "value": [ { - "type": "FnValue", + "type": "Tokens", "span": { - "start": 160, + "start": 159, "end": 165, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 160, - "end": 163, - "ctxt": 0 - }, - "value": "foo", - "raw": "foo" - }, - "args": [] + "tokens": [ + { + "span": { + "start": 159, + "end": 160, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 160, + "end": 164, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 164, + "end": 165, + "ctxt": 0 + }, + "token": "RParen" + } + ] } ], "important": null @@ -405,7 +591,7 @@ "type": "Declaration", "span": { "start": 168, - "end": 197, + "end": 187, "ctxt": 0 }, "property": { @@ -420,41 +606,66 @@ }, "value": [ { - "type": "FnValue", + "type": "Tokens", "span": { - "start": 187, + "start": 186, "end": 197, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 187, - "end": 190, - "ctxt": 0 - }, - "value": "foo", - "raw": "foo" - }, - "args": [ + "tokens": [ + { + "span": { + "start": 186, + "end": 187, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 187, + "end": 191, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "foo", + "raw": "foo" + } + } + }, { - "type": "FnValue", "span": { "start": 191, + "end": 195, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 195, "end": 196, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 191, - "end": 194, - "ctxt": 0 - }, - "value": "bar", - "raw": "bar" + "token": "RParen" + }, + { + "span": { + "start": 196, + "end": 197, + "ctxt": 0 }, - "args": [] + "token": "RParen" } ] } @@ -465,7 +676,7 @@ "type": "Declaration", "span": { "start": 200, - "end": 218, + "end": 215, "ctxt": 0 }, "property": { @@ -480,13 +691,54 @@ }, "value": [ { - "type": "RoundBracketBlock", + "type": "Tokens", "span": { - "start": 215, + "start": 214, "end": 218, "ctxt": 0 }, - "children": null + "tokens": [ + { + "span": { + "start": 214, + "end": 215, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 215, + "end": 216, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 216, + "end": 217, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 217, + "end": 218, + "ctxt": 0 + }, + "token": "RParen" + } + ] } ], "important": null @@ -495,7 +747,7 @@ "type": "Declaration", "span": { "start": 221, - "end": 234, + "end": 231, "ctxt": 0 }, "property": { @@ -510,34 +762,54 @@ }, "value": [ { - "type": "BraceValue", + "type": "Tokens", "span": { - "start": 231, + "start": 230, "end": 234, "ctxt": 0 }, - "value": { - "type": "Tokens", - "span": { - "start": 232, - "end": 233, - "ctxt": 0 - }, - "tokens": [ - { - "span": { - "start": 232, - "end": 233, - "ctxt": 0 - }, - "token": { - "WhiteSpace": { - "value": " " - } + "tokens": [ + { + "span": { + "start": 230, + "end": 231, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 231, + "end": 232, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 232, + "end": 233, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " } } - ] - } + }, + { + "span": { + "start": 233, + "end": 234, + "ctxt": 0 + }, + "token": "RBrace" + } + ] } ], "important": null @@ -546,7 +818,7 @@ "type": "Declaration", "span": { "start": 237, - "end": 252, + "end": 249, "ctxt": 0 }, "property": { @@ -561,13 +833,54 @@ }, "value": [ { - "type": "SquareBracketBlock", + "type": "Tokens", "span": { - "start": 249, + "start": 248, "end": 252, "ctxt": 0 }, - "children": [] + "tokens": [ + { + "span": { + "start": 248, + "end": 249, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 249, + "end": 250, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 250, + "end": 251, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 251, + "end": 252, + "ctxt": 0 + }, + "token": "RBracket" + } + ] } ], "important": null @@ -576,7 +889,7 @@ "type": "Declaration", "span": { "start": 255, - "end": 284, + "end": 277, "ctxt": 0 }, "property": { @@ -591,23 +904,39 @@ }, "value": [ { - "type": "AtTextValue", + "type": "Tokens", "span": { - "start": 277, + "start": 276, "end": 284, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 277, - "end": 284, - "ctxt": 0 - }, - "value": "foobar", - "raw": "foobar" - }, - "block": null + "tokens": [ + { + "span": { + "start": 276, + "end": 277, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 277, + "end": 284, + "ctxt": 0 + }, + "token": { + "AtKeyword": { + "value": "foobar", + "raw": "foobar" + } + } + } + ] } ], "important": null @@ -616,7 +945,7 @@ "type": "Declaration", "span": { "start": 287, - "end": 313, + "end": 307, "ctxt": 0 }, "property": { @@ -631,23 +960,39 @@ }, "value": [ { - "type": "AtTextValue", + "type": "Tokens", "span": { - "start": 307, + "start": 306, "end": 313, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 307, - "end": 313, - "ctxt": 0 - }, - "value": "media", - "raw": "media" - }, - "block": null + "tokens": [ + { + "span": { + "start": 306, + "end": 307, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 307, + "end": 313, + "ctxt": 0 + }, + "token": { + "AtKeyword": { + "value": "media", + "raw": "media" + } + } + } + ] } ], "important": null @@ -656,7 +1001,7 @@ "type": "Declaration", "span": { "start": 316, - "end": 354, + "end": 344, "ctxt": 0 }, "property": { @@ -671,40 +1016,67 @@ }, "value": [ { - "type": "AtTextValue", - "span": { - "start": 344, - "end": 351, - "ctxt": 0 - }, - "name": { - "type": "Identifier", - "span": { - "start": 344, - "end": 351, - "ctxt": 0 - }, - "value": "foobar", - "raw": "foobar" - }, - "block": null - }, - { - "type": "BraceValue", + "type": "Tokens", "span": { - "start": 352, + "start": 343, "end": 354, "ctxt": 0 }, - "value": { - "type": "Tokens", - "span": { - "start": 353, - "end": 353, - "ctxt": 0 - }, - "tokens": [] - } + "tokens": [ + { + "span": { + "start": 343, + "end": 344, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 344, + "end": 351, + "ctxt": 0 + }, + "token": { + "AtKeyword": { + "value": "foobar", + "raw": "foobar" + } + } + }, + { + "span": { + "start": 351, + "end": 352, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 352, + "end": 353, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 353, + "end": 354, + "ctxt": 0 + }, + "token": "RBrace" + } + ] } ], "important": null @@ -713,7 +1085,7 @@ "type": "Declaration", "span": { "start": 357, - "end": 392, + "end": 383, "ctxt": 0 }, "property": { @@ -728,40 +1100,67 @@ }, "value": [ { - "type": "AtTextValue", - "span": { - "start": 383, - "end": 389, - "ctxt": 0 - }, - "name": { - "type": "Identifier", - "span": { - "start": 383, - "end": 389, - "ctxt": 0 - }, - "value": "media", - "raw": "media" - }, - "block": null - }, - { - "type": "BraceValue", + "type": "Tokens", "span": { - "start": 390, + "start": 382, "end": 392, "ctxt": 0 }, - "value": { - "type": "Tokens", - "span": { - "start": 391, - "end": 391, - "ctxt": 0 - }, - "tokens": [] - } + "tokens": [ + { + "span": { + "start": 382, + "end": 383, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 383, + "end": 389, + "ctxt": 0 + }, + "token": { + "AtKeyword": { + "value": "media", + "raw": "media" + } + } + }, + { + "span": { + "start": 389, + "end": 390, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 390, + "end": 391, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 391, + "end": 392, + "ctxt": 0 + }, + "token": "RBrace" + } + ] } ], "important": null @@ -770,7 +1169,7 @@ "type": "Declaration", "span": { "start": 395, - "end": 419, + "end": 415, "ctxt": 0 }, "property": { @@ -787,11 +1186,23 @@ { "type": "Tokens", "span": { - "start": 415, + "start": 414, "end": 419, "ctxt": 0 }, "tokens": [ + { + "span": { + "start": 414, + "end": 415, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, { "span": { "start": 415, @@ -809,7 +1220,7 @@ "type": "Declaration", "span": { "start": 422, - "end": 445, + "end": 442, "ctxt": 0 }, "property": { @@ -826,11 +1237,23 @@ { "type": "Tokens", "span": { - "start": 442, + "start": 441, "end": 445, "ctxt": 0 }, "tokens": [ + { + "span": { + "start": 441, + "end": 442, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, { "span": { "start": 442, @@ -848,7 +1271,7 @@ "type": "Declaration", "span": { "start": 448, - "end": 475, + "end": 469, "ctxt": 0 }, "property": { @@ -863,30 +1286,48 @@ }, "value": [ { - "type": "RoundBracketBlock", + "type": "Tokens", "span": { - "start": 469, + "start": 468, "end": 475, "ctxt": 0 }, - "children": [ + "tokens": [ + { + "span": { + "start": 468, + "end": 469, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 469, + "end": 470, + "ctxt": 0 + }, + "token": "LParen" + }, { - "type": "Tokens", "span": { "start": 470, "end": 474, "ctxt": 0 }, - "tokens": [ - { - "span": { - "start": 470, - "end": 474, - "ctxt": 0 - }, - "token": "CDO" - } - ] + "token": "CDO" + }, + { + "span": { + "start": 474, + "end": 475, + "ctxt": 0 + }, + "token": "RParen" } ] } @@ -897,7 +1338,7 @@ "type": "Declaration", "span": { "start": 478, - "end": 504, + "end": 499, "ctxt": 0 }, "property": { @@ -912,30 +1353,48 @@ }, "value": [ { - "type": "RoundBracketBlock", + "type": "Tokens", "span": { - "start": 499, + "start": 498, "end": 504, "ctxt": 0 }, - "children": [ + "tokens": [ + { + "span": { + "start": 498, + "end": 499, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 499, + "end": 500, + "ctxt": 0 + }, + "token": "LParen" + }, { - "type": "Tokens", "span": { "start": 500, "end": 503, "ctxt": 0 }, - "tokens": [ - { - "span": { - "start": 500, - "end": 503, - "ctxt": 0 - }, - "token": "CDC" - } - ] + "token": "CDC" + }, + { + "span": { + "start": 503, + "end": 504, + "ctxt": 0 + }, + "token": "RParen" } ] } diff --git a/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug index 82c3511bc919..6beb8ea04820 100644 --- a/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/custom-properties/span.rust-debug @@ -87,7 +87,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:2:2 | 2 | --foo: 'bar'; - | ^^^^^^^^^^^^ + | ^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:2:2 @@ -96,12 +96,24 @@ error: Ident | ^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:2:9 + --> $DIR/tests/fixture/rome/custom-properties/input.css:2:8 | 2 | --foo: 'bar'; - | ^^^^^ + | ^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:2:8 + | +2 | --foo: 'bar'; + | ^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:2:8 + | +2 | --foo: 'bar'; + | ^ -error: Str +error: Str { value: Atom('bar' type=inline), raw: Atom(''bar'' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:2:9 | 2 | --foo: 'bar'; @@ -111,7 +123,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:3:2 | 3 | --lore-ipsum: "foo"; - | ^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:3:2 @@ -120,12 +132,24 @@ error: Ident | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:3:16 + --> $DIR/tests/fixture/rome/custom-properties/input.css:3:15 | 3 | --lore-ipsum: "foo"; - | ^^^^^ + | ^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:3:15 + | +3 | --lore-ipsum: "foo"; + | ^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:3:15 + | +3 | --lore-ipsum: "foo"; + | ^ -error: Str +error: Str { value: Atom('foo' type=inline), raw: Atom('"foo"' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:3:16 | 3 | --lore-ipsum: "foo"; @@ -135,7 +159,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:4:2 | 4 | --FANCY: "abort"; - | ^^^^^^^^^^^^^^^^ + | ^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:4:2 @@ -144,12 +168,24 @@ error: Ident | ^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:4:11 + --> $DIR/tests/fixture/rome/custom-properties/input.css:4:10 | 4 | --FANCY: "abort"; - | ^^^^^^^ + | ^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:4:10 + | +4 | --FANCY: "abort"; + | ^^^^^^^^ -error: Str +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:4:10 + | +4 | --FANCY: "abort"; + | ^ + +error: Str { value: Atom('abort' type=inline), raw: Atom('"abort"' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:4:11 | 4 | --FANCY: "abort"; @@ -159,7 +195,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:5:2 | 5 | --test: 1987; - | ^^^^^^^^^^^^ + | ^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:5:2 @@ -168,12 +204,24 @@ error: Ident | ^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:5:10 + --> $DIR/tests/fixture/rome/custom-properties/input.css:5:9 | 5 | --test: 1987; - | ^^^^ + | ^^^^^ + +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:5:9 + | +5 | --test: 1987; + | ^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:5:9 + | +5 | --test: 1987; + | ^ -error: Num +error: Num { value: 1987.0, raw: Atom('1987' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:5:10 | 5 | --test: 1987; @@ -183,7 +231,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:6:2 | 6 | --percentage: 25%; - | ^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:6:2 @@ -192,28 +240,34 @@ error: Ident | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:6:16 + --> $DIR/tests/fixture/rome/custom-properties/input.css:6:15 | 6 | --percentage: 25%; - | ^^^ + | ^^^^ -error: PercentValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:6:16 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:6:15 | 6 | --percentage: 25%; - | ^^^ + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:6:15 + | +6 | --percentage: 25%; + | ^ -error: Num +error: Percent { value: 25.0, raw: Atom('25' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:6:16 | 6 | --percentage: 25%; - | ^^ + | ^^^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:7:2 | 7 | --number: 37; - | ^^^^^^^^^^^^ + | ^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:7:2 @@ -222,12 +276,24 @@ error: Ident | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:7:12 + --> $DIR/tests/fixture/rome/custom-properties/input.css:7:11 | 7 | --number: 37; - | ^^ + | ^^^ + +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:7:11 + | +7 | --number: 37; + | ^^^ -error: Num +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:7:11 + | +7 | --number: 37; + | ^ + +error: Num { value: 37.0, raw: Atom('37' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:7:12 | 7 | --number: 37; @@ -237,7 +303,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:8:2 | 8 | --length: 12em; - | ^^^^^^^^^^^^^^ + | ^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:8:2 @@ -246,34 +312,34 @@ error: Ident | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:8:12 + --> $DIR/tests/fixture/rome/custom-properties/input.css:8:11 | 8 | --length: 12em; - | ^^^^ + | ^^^^^ -error: UnitValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:8:12 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:8:11 | 8 | --length: 12em; - | ^^^^ + | ^^^^^ -error: Num - --> $DIR/tests/fixture/rome/custom-properties/input.css:8:12 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:8:11 | 8 | --length: 12em; - | ^^ + | ^ -error: Unit - --> $DIR/tests/fixture/rome/custom-properties/input.css:8:14 +error: Dimension { value: 12.0, raw_value: Atom('12' type=inline), unit: Atom('em' type=inline), raw_unit: Atom('em' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:8:12 | 8 | --length: 12em; - | ^^ + | ^^^^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:9:2 | 9 | --time: 75ms; - | ^^^^^^^^^^^^ + | ^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:9:2 @@ -282,34 +348,34 @@ error: Ident | ^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:9:10 + --> $DIR/tests/fixture/rome/custom-properties/input.css:9:9 | 9 | --time: 75ms; - | ^^^^ + | ^^^^^ -error: UnitValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:9:10 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:9:9 | 9 | --time: 75ms; - | ^^^^ + | ^^^^^ -error: Num - --> $DIR/tests/fixture/rome/custom-properties/input.css:9:10 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:9:9 | 9 | --time: 75ms; - | ^^ + | ^ -error: Unit - --> $DIR/tests/fixture/rome/custom-properties/input.css:9:12 +error: Dimension { value: 75.0, raw_value: Atom('75' type=inline), unit: Atom('ms' type=inline), raw_unit: Atom('ms' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:9:10 | 9 | --time: 75ms; - | ^^ + | ^^^^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:10:2 | 10 | --function: foo(); - | ^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:10:2 @@ -318,28 +384,40 @@ error: Ident | ^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:10:14 + --> $DIR/tests/fixture/rome/custom-properties/input.css:10:13 | 10 | --function: foo(); - | ^^^^^ + | ^^^^^^ -error: FnValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:10:14 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:10:13 | 10 | --function: foo(); - | ^^^^^ + | ^^^^^^ -error: Ident +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:10:13 + | +10 | --function: foo(); + | ^ + +error: Function { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:10:14 | 10 | --function: foo(); - | ^^^ + | ^^^^ + +error: RParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:10:18 + | +10 | --function: foo(); + | ^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:11:2 | 11 | --nested-function: foo(bar()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:11:2 @@ -348,46 +426,52 @@ error: Ident | ^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:11:21 + --> $DIR/tests/fixture/rome/custom-properties/input.css:11:20 | 11 | --nested-function: foo(bar()); - | ^^^^^^^^^^ + | ^^^^^^^^^^^ -error: FnValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:11:21 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:11:20 | 11 | --nested-function: foo(bar()); - | ^^^^^^^^^^ + | ^^^^^^^^^^^ -error: Ident +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:11:20 + | +11 | --nested-function: foo(bar()); + | ^ + +error: Function { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:11:21 | 11 | --nested-function: foo(bar()); - | ^^^ + | ^^^^ -error: Value +error: Function { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:11:25 | 11 | --nested-function: foo(bar()); - | ^^^^^ + | ^^^^ -error: FnValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:11:25 +error: RParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:11:29 | 11 | --nested-function: foo(bar()); - | ^^^^^ + | ^ -error: Ident - --> $DIR/tests/fixture/rome/custom-properties/input.css:11:25 +error: RParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:11:30 | 11 | --nested-function: foo(bar()); - | ^^^ + | ^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:12:2 | 12 | --parentheses: ( ); - | ^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:12:2 @@ -396,22 +480,46 @@ error: Ident | ^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:12:17 + --> $DIR/tests/fixture/rome/custom-properties/input.css:12:16 | 12 | --parentheses: ( ); - | ^^^ + | ^^^^ -error: RoundBracketBlock +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:12:16 + | +12 | --parentheses: ( ); + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:12:16 + | +12 | --parentheses: ( ); + | ^ + +error: LParen --> $DIR/tests/fixture/rome/custom-properties/input.css:12:17 | 12 | --parentheses: ( ); - | ^^^ + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:12:18 + | +12 | --parentheses: ( ); + | ^ + +error: RParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:12:19 + | +12 | --parentheses: ( ); + | ^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:13:2 | 13 | --braces: { }; - | ^^^^^^^^^^^^^ + | ^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:13:2 @@ -420,28 +528,28 @@ error: Ident | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:13:12 + --> $DIR/tests/fixture/rome/custom-properties/input.css:13:11 | 13 | --braces: { }; - | ^^^ + | ^^^^ -error: BraceValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:13:12 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:13:11 | 13 | --braces: { }; - | ^^^ + | ^^^^ -error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:13:13 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:13:11 | 13 | --braces: { }; - | ^ + | ^ -error: Tokens - --> $DIR/tests/fixture/rome/custom-properties/input.css:13:13 +error: LBrace + --> $DIR/tests/fixture/rome/custom-properties/input.css:13:12 | 13 | --braces: { }; - | ^ + | ^ error: WhiteSpace { value: Atom(' ' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:13:13 @@ -449,11 +557,17 @@ error: WhiteSpace { value: Atom(' ' type=inline) } 13 | --braces: { }; | ^ +error: RBrace + --> $DIR/tests/fixture/rome/custom-properties/input.css:13:14 + | +13 | --braces: { }; + | ^ + error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:14:2 | 14 | --brackets: [ ]; - | ^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:14:2 @@ -462,22 +576,46 @@ error: Ident | ^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:14:14 + --> $DIR/tests/fixture/rome/custom-properties/input.css:14:13 + | +14 | --brackets: [ ]; + | ^^^^ + +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:14:13 + | +14 | --brackets: [ ]; + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:14:13 | 14 | --brackets: [ ]; - | ^^^ + | ^ -error: SquareBracketBlock +error: LBracket --> $DIR/tests/fixture/rome/custom-properties/input.css:14:14 | 14 | --brackets: [ ]; - | ^^^ + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:14:15 + | +14 | --brackets: [ ]; + | ^ + +error: RBracket + --> $DIR/tests/fixture/rome/custom-properties/input.css:14:16 + | +14 | --brackets: [ ]; + | ^ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:15:2 | 15 | --at-keyword-unknown: @foobar; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:15:2 @@ -486,18 +624,24 @@ error: Ident | ^^^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:15:24 + --> $DIR/tests/fixture/rome/custom-properties/input.css:15:23 | 15 | --at-keyword-unknown: @foobar; - | ^^^^^^^ + | ^^^^^^^^ -error: AtTextValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:15:24 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:15:23 | 15 | --at-keyword-unknown: @foobar; - | ^^^^^^^ + | ^^^^^^^^ -error: Ident +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:15:23 + | +15 | --at-keyword-unknown: @foobar; + | ^ + +error: AtKeyword { value: Atom('foobar' type=inline), raw: Atom('foobar' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:15:24 | 15 | --at-keyword-unknown: @foobar; @@ -507,7 +651,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:16:2 | 16 | --at-keyword-known: @media; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:16:2 @@ -516,18 +660,24 @@ error: Ident | ^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:16:22 + --> $DIR/tests/fixture/rome/custom-properties/input.css:16:21 | 16 | --at-keyword-known: @media; - | ^^^^^^ + | ^^^^^^^ -error: AtTextValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:16:22 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:16:21 | 16 | --at-keyword-known: @media; - | ^^^^^^ + | ^^^^^^^ -error: Ident +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:16:21 + | +16 | --at-keyword-known: @media; + | ^ + +error: AtKeyword { value: Atom('media' type=inline), raw: Atom('media' type=inline) } --> $DIR/tests/fixture/rome/custom-properties/input.css:16:22 | 16 | --at-keyword-known: @media; @@ -537,7 +687,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:17:2 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:17:2 @@ -546,42 +696,42 @@ error: Ident | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:17:30 + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:29 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^^^^^^^ + | ^^^^^^^^^^^ -error: AtTextValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:17:30 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:29 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^^^^^^^ + | ^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/rome/custom-properties/input.css:17:30 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:29 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^^^^^^^ + | ^ -error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:17:38 +error: AtKeyword { value: Atom('foobar' type=inline), raw: Atom('foobar' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:30 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^^ + | ^^^^^^^ -error: BraceValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:17:38 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:37 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^^ + | ^ -error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:17:39 +error: LBrace + --> $DIR/tests/fixture/rome/custom-properties/input.css:17:38 | 17 | --at-keyword-unknown-block: @foobar {}; - | ^ + | ^ -error: Tokens +error: RBrace --> $DIR/tests/fixture/rome/custom-properties/input.css:17:39 | 17 | --at-keyword-unknown-block: @foobar {}; @@ -591,7 +741,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:18:2 | 18 | --at-keyword-known-block: @media {}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:18:2 @@ -600,42 +750,42 @@ error: Ident | ^^^^^^^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:18:28 + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:27 | 18 | --at-keyword-known-block: @media {}; - | ^^^^^^ + | ^^^^^^^^^^ -error: AtTextValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:18:28 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:27 | 18 | --at-keyword-known-block: @media {}; - | ^^^^^^ + | ^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/rome/custom-properties/input.css:18:28 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:27 | 18 | --at-keyword-known-block: @media {}; - | ^^^^^^ + | ^ -error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:18:35 +error: AtKeyword { value: Atom('media' type=inline), raw: Atom('media' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:28 | 18 | --at-keyword-known-block: @media {}; - | ^^ + | ^^^^^^ -error: BraceValue - --> $DIR/tests/fixture/rome/custom-properties/input.css:18:35 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:34 | 18 | --at-keyword-known-block: @media {}; - | ^^ + | ^ -error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:18:36 +error: LBrace + --> $DIR/tests/fixture/rome/custom-properties/input.css:18:35 | 18 | --at-keyword-known-block: @media {}; - | ^ + | ^ -error: Tokens +error: RBrace --> $DIR/tests/fixture/rome/custom-properties/input.css:18:36 | 18 | --at-keyword-known-block: @media {}; @@ -645,7 +795,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:19:2 | 19 | --cdo-at-top-level: $DIR/tests/fixture/rome/custom-properties/input.css:19:2 @@ -654,16 +804,22 @@ error: Ident | ^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:19:22 + --> $DIR/tests/fixture/rome/custom-properties/input.css:19:21 | 19 | --cdo-at-top-level: $DIR/tests/fixture/rome/custom-properties/input.css:19:22 + --> $DIR/tests/fixture/rome/custom-properties/input.css:19:21 | 19 | --cdo-at-top-level: $DIR/tests/fixture/rome/custom-properties/input.css:19:21 + | +19 | --cdo-at-top-level: $DIR/tests/fixture/rome/custom-properties/input.css:19:22 @@ -675,7 +831,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:20:2 | 20 | --cdc-at-top-level: -->; - | ^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:20:2 @@ -684,16 +840,22 @@ error: Ident | ^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:20:22 + --> $DIR/tests/fixture/rome/custom-properties/input.css:20:21 | 20 | --cdc-at-top-level: -->; - | ^^^ + | ^^^^ error: Tokens - --> $DIR/tests/fixture/rome/custom-properties/input.css:20:22 + --> $DIR/tests/fixture/rome/custom-properties/input.css:20:21 | 20 | --cdc-at-top-level: -->; - | ^^^ + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:20:21 + | +20 | --cdc-at-top-level: -->; + | ^ error: CDC --> $DIR/tests/fixture/rome/custom-properties/input.css:20:22 @@ -705,7 +867,7 @@ error: Declaration --> $DIR/tests/fixture/rome/custom-properties/input.css:21:2 | 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:2 @@ -714,28 +876,28 @@ error: Ident | ^^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:21:23 + --> $DIR/tests/fixture/rome/custom-properties/input.css:21:22 | 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:23 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:21:22 | 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:24 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:21:22 | 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:24 +error: LParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:21:23 | 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:24 @@ -743,11 +905,17 @@ error: CDO 21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:21:28 + | +21 | --cdo-not-top-level: ( $DIR/tests/fixture/rome/custom-properties/input.css:22:2 | 22 | --cdc-not-top-level: (-->); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/custom-properties/input.css:22:2 @@ -756,28 +924,28 @@ error: Ident | ^^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:22:23 + --> $DIR/tests/fixture/rome/custom-properties/input.css:22:22 | 22 | --cdc-not-top-level: (-->); - | ^^^^^ + | ^^^^^^ -error: RoundBracketBlock - --> $DIR/tests/fixture/rome/custom-properties/input.css:22:23 +error: Tokens + --> $DIR/tests/fixture/rome/custom-properties/input.css:22:22 | 22 | --cdc-not-top-level: (-->); - | ^^^^^ + | ^^^^^^ -error: Value - --> $DIR/tests/fixture/rome/custom-properties/input.css:22:24 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/custom-properties/input.css:22:22 | 22 | --cdc-not-top-level: (-->); - | ^^^ + | ^ -error: Tokens - --> $DIR/tests/fixture/rome/custom-properties/input.css:22:24 +error: LParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:22:23 | 22 | --cdc-not-top-level: (-->); - | ^^^ + | ^ error: CDC --> $DIR/tests/fixture/rome/custom-properties/input.css:22:24 @@ -785,3 +953,9 @@ error: CDC 22 | --cdc-not-top-level: (-->); | ^^^ +error: RParen + --> $DIR/tests/fixture/rome/custom-properties/input.css:22:27 + | +22 | --cdc-not-top-level: (-->); + | ^ + diff --git a/crates/swc_css_parser/tests/fixture/rome/functions/output.json b/crates/swc_css_parser/tests/fixture/rome/functions/output.json index 3c6735af7509..57092b382989 100644 --- a/crates/swc_css_parser/tests/fixture/rome/functions/output.json +++ b/crates/swc_css_parser/tests/fixture/rome/functions/output.json @@ -75,7 +75,7 @@ "type": "Declaration", "span": { "start": 10, - "end": 22, + "end": 19, "ctxt": 0 }, "property": { @@ -90,31 +90,41 @@ }, "value": [ { - "type": "UnitValue", + "type": "Tokens", "span": { - "start": 19, + "start": 18, "end": 22, "ctxt": 0 }, - "value": { - "type": "Number", - "span": { - "start": 19, - "end": 20, - "ctxt": 0 - }, - "value": 2.0, - "raw": "2" - }, - "unit": { - "span": { - "start": 20, - "end": 22, - "ctxt": 0 + "tokens": [ + { + "span": { + "start": 18, + "end": 19, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } }, - "value": "px", - "raw": "px" - } + { + "span": { + "start": 19, + "end": 22, + "ctxt": 0 + }, + "token": { + "Dimension": { + "value": 2.0, + "raw_value": "2", + "unit": "px", + "raw_unit": "px" + } + } + } + ] } ], "important": null diff --git a/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug b/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug index 1bda9631b290..7b43c8db4247 100644 --- a/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/rome/functions/span.rust-debug @@ -87,7 +87,7 @@ error: Declaration --> $DIR/tests/fixture/rome/functions/input.css:2:2 | 2 | --fancy: 2px; - | ^^^^^^^^^^^^ + | ^^^^^^^^^ error: Ident --> $DIR/tests/fixture/rome/functions/input.css:2:2 @@ -96,28 +96,28 @@ error: Ident | ^^^^^^^ error: Value - --> $DIR/tests/fixture/rome/functions/input.css:2:11 + --> $DIR/tests/fixture/rome/functions/input.css:2:10 | 2 | --fancy: 2px; - | ^^^ + | ^^^^ -error: UnitValue - --> $DIR/tests/fixture/rome/functions/input.css:2:11 +error: Tokens + --> $DIR/tests/fixture/rome/functions/input.css:2:10 | 2 | --fancy: 2px; - | ^^^ + | ^^^^ -error: Num - --> $DIR/tests/fixture/rome/functions/input.css:2:11 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/rome/functions/input.css:2:10 | 2 | --fancy: 2px; - | ^ + | ^ -error: Unit - --> $DIR/tests/fixture/rome/functions/input.css:2:12 +error: Dimension { value: 2.0, raw_value: Atom('2' type=inline), unit: Atom('px' type=inline), raw_unit: Atom('px' type=inline) } + --> $DIR/tests/fixture/rome/functions/input.css:2:11 | 2 | --fancy: 2px; - | ^^ + | ^^^ error: Declaration --> $DIR/tests/fixture/rome/functions/input.css:3:2 diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/input.css b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/input.css new file mode 100644 index 000000000000..eb1582680ef4 --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/input.css @@ -0,0 +1,20 @@ +:unknown {} +:unknown() {} +:unknown(foo) {} +:unknown(foo bar) {} +:unknown(foo, bar) {} +:unknown([foo]) {} +:unknown((foo bar)) {} +:unknown(((foo bar))) {} +:unknown({foo: bar}) {} +:unknown({{foo: bar}}) {} +:unknown({foo: bar !important}) {} +:unknown("string") {} +:unknown("string", foo) {} +:unknown('string') {} +:unknown(url(foo.png)) {} +:unknown({!}) {} +:unknown(!) {} +:unknown({;}) {} +:unknown(;) {} + diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/output.json new file mode 100644 index 000000000000..476a37bda836 --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/output.json @@ -0,0 +1,2109 @@ +{ + "type": "Stylesheet", + "span": { + "start": 0, + "end": 400, + "ctxt": 0 + }, + "rules": [ + { + "type": "QualifiedRule", + "span": { + "start": 0, + "end": 11, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 0, + "end": 8, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 0, + "end": 8, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 0, + "end": 8, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 0, + "end": 8, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1, + "end": 8, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": null + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 9, + "end": 11, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 12, + "end": 25, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 12, + "end": 22, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 12, + "end": 22, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 12, + "end": 22, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 12, + "end": 22, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 13, + "end": 20, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 21, + "end": 21, + "ctxt": 0 + }, + "tokens": [] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 23, + "end": 25, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 26, + "end": 42, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 26, + "end": 39, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 26, + "end": 39, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 26, + "end": 39, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 26, + "end": 39, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 27, + "end": 34, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 35, + "end": 38, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 35, + "end": 38, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 40, + "end": 42, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 43, + "end": 63, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 43, + "end": 60, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 43, + "end": 60, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 43, + "end": 60, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 43, + "end": 60, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 44, + "end": 51, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 52, + "end": 59, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 52, + "end": 55, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 55, + "end": 56, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 56, + "end": 59, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 61, + "end": 63, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 64, + "end": 85, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 64, + "end": 82, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 64, + "end": 82, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 64, + "end": 82, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 64, + "end": 82, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 65, + "end": 72, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 73, + "end": 81, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 73, + "end": 76, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 76, + "end": 77, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 77, + "end": 78, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 78, + "end": 81, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 83, + "end": 85, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 86, + "end": 104, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 86, + "end": 101, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 86, + "end": 101, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 86, + "end": 101, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 86, + "end": 101, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 87, + "end": 94, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 95, + "end": 100, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 95, + "end": 96, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 96, + "end": 99, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 99, + "end": 100, + "ctxt": 0 + }, + "token": "RBracket" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 102, + "end": 104, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 105, + "end": 127, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 105, + "end": 124, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 105, + "end": 124, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 105, + "end": 124, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 105, + "end": 124, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 106, + "end": 113, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 114, + "end": 123, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 114, + "end": 115, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 115, + "end": 118, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 118, + "end": 119, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 119, + "end": 122, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 122, + "end": 123, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 125, + "end": 127, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 128, + "end": 152, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 128, + "end": 149, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 128, + "end": 149, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 128, + "end": 149, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 128, + "end": 149, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 129, + "end": 136, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 137, + "end": 148, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 137, + "end": 138, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 138, + "end": 139, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 139, + "end": 142, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 142, + "end": 143, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 143, + "end": 146, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 146, + "end": 147, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 147, + "end": 148, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 150, + "end": 152, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 153, + "end": 176, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 153, + "end": 173, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 153, + "end": 173, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 153, + "end": 173, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 153, + "end": 173, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 154, + "end": 161, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 162, + "end": 172, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 162, + "end": 163, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 163, + "end": 166, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 166, + "end": 167, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 167, + "end": 168, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 168, + "end": 171, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 171, + "end": 172, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 174, + "end": 176, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 177, + "end": 202, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 177, + "end": 199, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 177, + "end": 199, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 177, + "end": 199, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 177, + "end": 199, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 178, + "end": 185, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 186, + "end": 198, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 186, + "end": 187, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 187, + "end": 188, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 188, + "end": 191, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 191, + "end": 192, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 192, + "end": 193, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 193, + "end": 196, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 196, + "end": 197, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 197, + "end": 198, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 200, + "end": 202, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 203, + "end": 237, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 203, + "end": 234, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 203, + "end": 234, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 203, + "end": 234, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 203, + "end": 234, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 204, + "end": 211, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 212, + "end": 233, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 212, + "end": 213, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 213, + "end": 216, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 216, + "end": 217, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 217, + "end": 218, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 218, + "end": 221, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 221, + "end": 222, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 222, + "end": 223, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + }, + { + "span": { + "start": 223, + "end": 232, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "important", + "raw": "important" + } + } + }, + { + "span": { + "start": 232, + "end": 233, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 235, + "end": 237, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 238, + "end": 259, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 238, + "end": 256, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 238, + "end": 256, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 238, + "end": 256, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 238, + "end": 256, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 239, + "end": 246, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 247, + "end": 255, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 247, + "end": 255, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "string", + "raw": "\"string\"" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 257, + "end": 259, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 260, + "end": 286, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 260, + "end": 283, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 260, + "end": 283, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 260, + "end": 283, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 260, + "end": 283, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 261, + "end": 268, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 269, + "end": 282, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 269, + "end": 277, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "string", + "raw": "\"string\"" + } + } + }, + { + "span": { + "start": 277, + "end": 278, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 278, + "end": 279, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 279, + "end": 282, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 284, + "end": 286, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 287, + "end": 308, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 287, + "end": 305, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 287, + "end": 305, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 287, + "end": 305, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 287, + "end": 305, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 288, + "end": 295, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 296, + "end": 304, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 296, + "end": 304, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "string", + "raw": "'string'" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 306, + "end": 308, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 309, + "end": 334, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 309, + "end": 331, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 309, + "end": 331, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 309, + "end": 331, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 309, + "end": 331, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 310, + "end": 317, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 318, + "end": 330, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 318, + "end": 330, + "ctxt": 0 + }, + "token": { + "Url": { + "value": "foo.png", + "raw": "foo.png" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 332, + "end": 334, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 335, + "end": 351, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 335, + "end": 348, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 335, + "end": 348, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 335, + "end": 348, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 335, + "end": 348, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 336, + "end": 343, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 344, + "end": 347, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 344, + "end": 345, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 345, + "end": 346, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + }, + { + "span": { + "start": 346, + "end": 347, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 349, + "end": 351, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 352, + "end": 366, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 352, + "end": 363, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 352, + "end": 363, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 352, + "end": 363, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 352, + "end": 363, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 353, + "end": 360, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 361, + "end": 362, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 361, + "end": 362, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 364, + "end": 366, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 367, + "end": 383, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 367, + "end": 380, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 367, + "end": 380, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 367, + "end": 380, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 367, + "end": 380, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 368, + "end": 375, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 376, + "end": 379, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 376, + "end": 377, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 377, + "end": 378, + "ctxt": 0 + }, + "token": "Semi" + }, + { + "span": { + "start": 378, + "end": 379, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 381, + "end": 383, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 384, + "end": 398, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 384, + "end": 395, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 384, + "end": 395, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 384, + "end": 395, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 384, + "end": 395, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 385, + "end": 392, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 393, + "end": 394, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 393, + "end": 394, + "ctxt": 0 + }, + "token": "Semi" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 396, + "end": 398, + "ctxt": 0 + }, + "items": [] + } + } + ] +} diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/span.rust-debug b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/span.rust-debug new file mode 100644 index 000000000000..fb63eb1c648b --- /dev/null +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-class/unknown/span.rust-debug @@ -0,0 +1,1512 @@ +error: Stylesheet + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | / :unknown {} +2 | | :unknown() {} +3 | | :unknown(foo) {} +4 | | :unknown(foo bar) {} +... | +19 | | :unknown(;) {} +20 | | + | |_^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:1 + | +1 | :unknown {} + | ^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:2 + | +1 | :unknown {} + | ^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:1:10 + | +1 | :unknown {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:1 + | +2 | :unknown() {} + | ^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:2 + | +2 | :unknown() {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:10 + | +2 | :unknown() {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:2:12 + | +2 | :unknown() {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:1 + | +3 | :unknown(foo) {} + | ^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:2 + | +3 | :unknown(foo) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:10 + | +3 | :unknown(foo) {} + | ^^^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:10 + | +3 | :unknown(foo) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:3:15 + | +3 | :unknown(foo) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:1 + | +4 | :unknown(foo bar) {} + | ^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:2 + | +4 | :unknown(foo bar) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:10 + | +4 | :unknown(foo bar) {} + | ^^^^^^^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:10 + | +4 | :unknown(foo bar) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:13 + | +4 | :unknown(foo bar) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:14 + | +4 | :unknown(foo bar) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:4:19 + | +4 | :unknown(foo bar) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:1 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:2 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:10 + | +5 | :unknown(foo, bar) {} + | ^^^^^^^^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:10 + | +5 | :unknown(foo, bar) {} + | ^^^ + +error: Comma + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:13 + | +5 | :unknown(foo, bar) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:14 + | +5 | :unknown(foo, bar) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:15 + | +5 | :unknown(foo, bar) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:5:20 + | +5 | :unknown(foo, bar) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:1 + | +6 | :unknown([foo]) {} + | ^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:2 + | +6 | :unknown([foo]) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:10 + | +6 | :unknown([foo]) {} + | ^^^^^ + +error: LBracket + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:10 + | +6 | :unknown([foo]) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:11 + | +6 | :unknown([foo]) {} + | ^^^ + +error: RBracket + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:14 + | +6 | :unknown([foo]) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:6:17 + | +6 | :unknown([foo]) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:1 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:2 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:10 + | +7 | :unknown((foo bar)) {} + | ^^^^^^^^^ + +error: LParen + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:10 + | +7 | :unknown((foo bar)) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:11 + | +7 | :unknown((foo bar)) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:14 + | +7 | :unknown((foo bar)) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:15 + | +7 | :unknown((foo bar)) {} + | ^^^ + +error: RParen + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:18 + | +7 | :unknown((foo bar)) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:7:21 + | +7 | :unknown((foo bar)) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:1 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:2 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:10 + | +8 | :unknown(((foo bar))) {} + | ^^^^^^^^^^^ + +error: LParen + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:10 + | +8 | :unknown(((foo bar))) {} + | ^ + +error: LParen + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:11 + | +8 | :unknown(((foo bar))) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:12 + | +8 | :unknown(((foo bar))) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:15 + | +8 | :unknown(((foo bar))) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:16 + | +8 | :unknown(((foo bar))) {} + | ^^^ + +error: RParen + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:19 + | +8 | :unknown(((foo bar))) {} + | ^ + +error: RParen + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:20 + | +8 | :unknown(((foo bar))) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:8:23 + | +8 | :unknown(((foo bar))) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:1 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:2 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:10 + | +9 | :unknown({foo: bar}) {} + | ^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:10 + | +9 | :unknown({foo: bar}) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:11 + | +9 | :unknown({foo: bar}) {} + | ^^^ + +error: Colon + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:14 + | +9 | :unknown({foo: bar}) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:15 + | +9 | :unknown({foo: bar}) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:16 + | +9 | :unknown({foo: bar}) {} + | ^^^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:19 + | +9 | :unknown({foo: bar}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:9:22 + | +9 | :unknown({foo: bar}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:1 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:2 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:10 + | +10 | :unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:10 + | +10 | :unknown({{foo: bar}}) {} + | ^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:11 + | +10 | :unknown({{foo: bar}}) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:12 + | +10 | :unknown({{foo: bar}}) {} + | ^^^ + +error: Colon + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:15 + | +10 | :unknown({{foo: bar}}) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:16 + | +10 | :unknown({{foo: bar}}) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:17 + | +10 | :unknown({{foo: bar}}) {} + | ^^^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:20 + | +10 | :unknown({{foo: bar}}) {} + | ^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:21 + | +10 | :unknown({{foo: bar}}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:10:24 + | +10 | :unknown({{foo: bar}}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:1 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:2 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:10 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:10 + | +11 | :unknown({foo: bar !important}) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:11 + | +11 | :unknown({foo: bar !important}) {} + | ^^^ + +error: Colon + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:14 + | +11 | :unknown({foo: bar !important}) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:15 + | +11 | :unknown({foo: bar !important}) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:16 + | +11 | :unknown({foo: bar !important}) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:19 + | +11 | :unknown({foo: bar !important}) {} + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:20 + | +11 | :unknown({foo: bar !important}) {} + | ^ + +error: Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:21 + | +11 | :unknown({foo: bar !important}) {} + | ^^^^^^^^^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:30 + | +11 | :unknown({foo: bar !important}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:11:33 + | +11 | :unknown({foo: bar !important}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:1 + | +12 | :unknown("string") {} + | ^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:2 + | +12 | :unknown("string") {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:10 + | +12 | :unknown("string") {} + | ^^^^^^^^ + +error: Str { value: Atom('string' type=static), raw: Atom('"string"' type=dynamic) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:10 + | +12 | :unknown("string") {} + | ^^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:12:20 + | +12 | :unknown("string") {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:1 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:2 + | +13 | :unknown("string", foo) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:10 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^^^^^^ + +error: Str { value: Atom('string' type=static), raw: Atom('"string"' type=dynamic) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:10 + | +13 | :unknown("string", foo) {} + | ^^^^^^^^ + +error: Comma + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:18 + | +13 | :unknown("string", foo) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:19 + | +13 | :unknown("string", foo) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:20 + | +13 | :unknown("string", foo) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:13:25 + | +13 | :unknown("string", foo) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:1 + | +14 | :unknown('string') {} + | ^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:2 + | +14 | :unknown('string') {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:10 + | +14 | :unknown('string') {} + | ^^^^^^^^ + +error: Str { value: Atom('string' type=static), raw: Atom(''string'' type=dynamic) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:10 + | +14 | :unknown('string') {} + | ^^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:14:20 + | +14 | :unknown('string') {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:1 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:2 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:10 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^ + +error: Url { value: Atom('foo.png' type=inline), raw: Atom('foo.png' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:10 + | +15 | :unknown(url(foo.png)) {} + | ^^^^^^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:15:24 + | +15 | :unknown(url(foo.png)) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:1 + | +16 | :unknown({!}) {} + | ^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:2 + | +16 | :unknown({!}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:10 + | +16 | :unknown({!}) {} + | ^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:10 + | +16 | :unknown({!}) {} + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:11 + | +16 | :unknown({!}) {} + | ^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:12 + | +16 | :unknown({!}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:16:15 + | +16 | :unknown({!}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:1 + | +17 | :unknown(!) {} + | ^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:2 + | +17 | :unknown(!) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:10 + | +17 | :unknown(!) {} + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:10 + | +17 | :unknown(!) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:17:13 + | +17 | :unknown(!) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:1 + | +18 | :unknown({;}) {} + | ^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:2 + | +18 | :unknown({;}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:10 + | +18 | :unknown({;}) {} + | ^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:10 + | +18 | :unknown({;}) {} + | ^ + +error: Semi + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:11 + | +18 | :unknown({;}) {} + | ^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:12 + | +18 | :unknown({;}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:18:15 + | +18 | :unknown({;}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:1 + | +19 | :unknown(;) {} + | ^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:2 + | +19 | :unknown(;) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:10 + | +19 | :unknown(;) {} + | ^ + +error: Semi + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:10 + | +19 | :unknown(;) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-class/unknown/input.css:19:13 + | +19 | :unknown(;) {} + | ^^ + diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/input.css b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/input.css index a5ddcbbabb38..e3dcd3c9694a 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/input.css +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/input.css @@ -1 +1,19 @@ -::unknown(unknown) {} +::unknown {} +::unknown() {} +::unknown(foo) {} +::unknown(foo bar) {} +::unknown(foo, bar) {} +::unknown([foo]) {} +::unknown((foo bar)) {} +::unknown(((foo bar))) {} +::unknown({foo: bar}) {} +::unknown({{foo: bar}}) {} +::unknown({foo: bar !important}) {} +::unknown("string") {} +::unknown("string", foo) {} +::unknown('string') {} +::unknown(url(foo.png)) {} +::unknown({!}) {} +::unknown(!) {} +::unknown({;}) {} +::unknown(;) {} diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/output.json b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/output.json index 830eb361f76b..d943a18baffa 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/output.json +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/output.json @@ -2,7 +2,7 @@ "type": "Stylesheet", "span": { "start": 0, - "end": 22, + "end": 418, "ctxt": 0 }, "rules": [ @@ -10,14 +10,14 @@ "type": "QualifiedRule", "span": { "start": 0, - "end": 21, + "end": 12, "ctxt": 0 }, "prelude": { "type": "SelectorList", "span": { "start": 0, - "end": 18, + "end": 9, "ctxt": 0 }, "children": [ @@ -25,7 +25,7 @@ "type": "ComplexSelector", "span": { "start": 0, - "end": 18, + "end": 9, "ctxt": 0 }, "children": [ @@ -33,7 +33,7 @@ "type": "CompoundSelector", "span": { "start": 0, - "end": 18, + "end": 9, "ctxt": 0 }, "nestingSelector": null, @@ -43,7 +43,7 @@ "type": "PseudoElementSelector", "span": { "start": 0, - "end": 18, + "end": 9, "ctxt": 0 }, "name": { @@ -56,24 +56,283 @@ "value": "unknown", "raw": "unknown" }, + "children": null + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 10, + "end": 12, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 13, + "end": 27, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 13, + "end": 24, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 13, + "end": 24, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 13, + "end": 24, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 13, + "end": 24, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 15, + "end": 22, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 23, + "end": 23, + "ctxt": 0 + }, + "tokens": [] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 25, + "end": 27, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 28, + "end": 45, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 28, + "end": 42, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 28, + "end": 42, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 28, + "end": 42, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 28, + "end": 42, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 30, + "end": 37, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 38, + "end": 41, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 38, + "end": 41, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 43, + "end": 45, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 46, + "end": 67, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 46, + "end": 64, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 46, + "end": 64, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 46, + "end": 64, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 46, + "end": 64, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 48, + "end": 55, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, "children": { "type": "Tokens", "span": { - "start": 10, - "end": 17, + "start": 56, + "end": 63, "ctxt": 0 }, "tokens": [ { "span": { - "start": 10, - "end": 17, + "start": 56, + "end": 59, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 59, + "end": 60, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 60, + "end": 63, "ctxt": 0 }, "token": { "Ident": { - "value": "unknown", - "raw": "unknown" + "value": "bar", + "raw": "bar" } } } @@ -89,8 +348,1758 @@ "block": { "type": "Block", "span": { - "start": 19, - "end": 21, + "start": 65, + "end": 67, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 68, + "end": 90, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 68, + "end": 87, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 68, + "end": 87, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 68, + "end": 87, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 68, + "end": 87, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 70, + "end": 77, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 78, + "end": 86, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 78, + "end": 81, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 81, + "end": 82, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 82, + "end": 83, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 83, + "end": 86, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 88, + "end": 90, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 91, + "end": 110, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 91, + "end": 107, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 91, + "end": 107, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 91, + "end": 107, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 91, + "end": 107, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 93, + "end": 100, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 101, + "end": 106, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 101, + "end": 102, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 102, + "end": 105, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 105, + "end": 106, + "ctxt": 0 + }, + "token": "RBracket" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 108, + "end": 110, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 111, + "end": 134, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 111, + "end": 131, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 111, + "end": 131, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 111, + "end": 131, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 111, + "end": 131, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 113, + "end": 120, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 121, + "end": 130, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 121, + "end": 122, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 122, + "end": 125, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 125, + "end": 126, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 126, + "end": 129, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 129, + "end": 130, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 132, + "end": 134, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 135, + "end": 160, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 135, + "end": 157, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 135, + "end": 157, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 135, + "end": 157, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 135, + "end": 157, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 137, + "end": 144, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 145, + "end": 156, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 145, + "end": 146, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 146, + "end": 147, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 147, + "end": 150, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 150, + "end": 151, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 151, + "end": 154, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 154, + "end": 155, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 155, + "end": 156, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 158, + "end": 160, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 161, + "end": 185, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 161, + "end": 182, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 161, + "end": 182, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 161, + "end": 182, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 161, + "end": 182, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 163, + "end": 170, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 171, + "end": 181, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 171, + "end": 172, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 172, + "end": 175, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 175, + "end": 176, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 176, + "end": 177, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 177, + "end": 180, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 180, + "end": 181, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 183, + "end": 185, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 186, + "end": 212, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 186, + "end": 209, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 186, + "end": 209, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 186, + "end": 209, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 186, + "end": 209, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 188, + "end": 195, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 196, + "end": 208, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 196, + "end": 197, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 197, + "end": 198, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 198, + "end": 201, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 201, + "end": 202, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 202, + "end": 203, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 203, + "end": 206, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 206, + "end": 207, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 207, + "end": 208, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 210, + "end": 212, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 213, + "end": 248, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 213, + "end": 245, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 213, + "end": 245, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 213, + "end": 245, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 213, + "end": 245, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 215, + "end": 222, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 223, + "end": 244, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 223, + "end": 224, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 224, + "end": 227, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + }, + { + "span": { + "start": 227, + "end": 228, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 228, + "end": 229, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 229, + "end": 232, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "bar", + "raw": "bar" + } + } + }, + { + "span": { + "start": 232, + "end": 233, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 233, + "end": 234, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + }, + { + "span": { + "start": 234, + "end": 243, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "important", + "raw": "important" + } + } + }, + { + "span": { + "start": 243, + "end": 244, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 246, + "end": 248, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 249, + "end": 271, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 249, + "end": 268, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 249, + "end": 268, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 249, + "end": 268, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 249, + "end": 268, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 251, + "end": 258, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 259, + "end": 267, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 259, + "end": 267, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "string", + "raw": "\"string\"" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 269, + "end": 271, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 272, + "end": 299, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 272, + "end": 296, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 272, + "end": 296, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 272, + "end": 296, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 272, + "end": 296, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 274, + "end": 281, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 282, + "end": 295, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 282, + "end": 290, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "string", + "raw": "\"string\"" + } + } + }, + { + "span": { + "start": 290, + "end": 291, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 291, + "end": 292, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 292, + "end": 295, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "foo", + "raw": "foo" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 297, + "end": 299, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 300, + "end": 322, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 300, + "end": 319, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 300, + "end": 319, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 300, + "end": 319, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 300, + "end": 319, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 302, + "end": 309, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 310, + "end": 318, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 310, + "end": 318, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "string", + "raw": "'string'" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 320, + "end": 322, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 323, + "end": 349, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 323, + "end": 346, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 323, + "end": 346, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 323, + "end": 346, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 323, + "end": 346, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 325, + "end": 332, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 333, + "end": 345, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 333, + "end": 345, + "ctxt": 0 + }, + "token": { + "Url": { + "value": "foo.png", + "raw": "foo.png" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 347, + "end": 349, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 350, + "end": 367, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 350, + "end": 364, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 350, + "end": 364, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 350, + "end": 364, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 350, + "end": 364, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 352, + "end": 359, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 360, + "end": 363, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 360, + "end": 361, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 361, + "end": 362, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + }, + { + "span": { + "start": 362, + "end": 363, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 365, + "end": 367, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 368, + "end": 383, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 368, + "end": 380, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 368, + "end": 380, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 368, + "end": 380, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 368, + "end": 380, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 370, + "end": 377, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 378, + "end": 379, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 378, + "end": 379, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 381, + "end": 383, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 384, + "end": 401, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 384, + "end": 398, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 384, + "end": 398, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 384, + "end": 398, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 384, + "end": 398, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 386, + "end": 393, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 394, + "end": 397, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 394, + "end": 395, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 395, + "end": 396, + "ctxt": 0 + }, + "token": "Semi" + }, + { + "span": { + "start": 396, + "end": 397, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 399, + "end": 401, + "ctxt": 0 + }, + "items": [] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 402, + "end": 417, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 402, + "end": 414, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 402, + "end": 414, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 402, + "end": 414, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoElementSelector", + "span": { + "start": 402, + "end": 414, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 404, + "end": 411, + "ctxt": 0 + }, + "value": "unknown", + "raw": "unknown" + }, + "children": { + "type": "Tokens", + "span": { + "start": 412, + "end": 413, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 412, + "end": 413, + "ctxt": 0 + }, + "token": "Semi" + } + ] + } + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 415, + "end": 417, "ctxt": 0 }, "items": [] diff --git a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/span.rust-debug b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/span.rust-debug index dfe965c3a74b..df5700b8bf4f 100644 --- a/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/selector/pseudo-element/unknown/span.rust-debug @@ -1,72 +1,1512 @@ error: Stylesheet + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + | +1 | / ::unknown {} +2 | | ::unknown() {} +3 | | ::unknown(foo) {} +4 | | ::unknown(foo bar) {} +... | +18 | | ::unknown({;}) {} +19 | | ::unknown(;) {} + | |________________^ + +error: Rule --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 | -1 | ::unknown(unknown) {} - | ^^^^^^^^^^^^^^^^^^^^^^ +1 | ::unknown {} + | ^^^^^^^^^^^^ -error: Rule +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + | +1 | ::unknown {} + | ^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + | +1 | ::unknown {} + | ^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + | +1 | ::unknown {} + | ^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + | +1 | ::unknown {} + | ^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + | +1 | ::unknown {} + | ^^^^^^^^^ + +error: PseudoElementSelector --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 | -1 | ::unknown(unknown) {} +1 | ::unknown {} + | ^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:3 + | +1 | ::unknown {} + | ^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:11 + | +1 | ::unknown {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:1 + | +2 | ::unknown() {} + | ^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:3 + | +2 | ::unknown() {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:11 + | +2 | ::unknown() {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:2:13 + | +2 | ::unknown() {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:1 + | +3 | ::unknown(foo) {} + | ^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:3 + | +3 | ::unknown(foo) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:11 + | +3 | ::unknown(foo) {} + | ^^^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:11 + | +3 | ::unknown(foo) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:3:16 + | +3 | ::unknown(foo) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 + | +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^^^^ error: QualifiedRule - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^^^^ error: SelectorList - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^ error: ComplexSelector - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^ error: CompoundSelector - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^ error: SubclassSelector - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^ error: PseudoElementSelector - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:1 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:1 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:3 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:3 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^ error: Tokens - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:11 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:11 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^^^^^^ -error: Ident { value: Atom('unknown' type=static), raw: Atom('unknown' type=static) } - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:11 +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:11 | -1 | ::unknown(unknown) {} - | ^^^^^^^ +4 | ::unknown(foo bar) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:14 + | +4 | ::unknown(foo bar) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:15 + | +4 | ::unknown(foo bar) {} + | ^^^ error: Block - --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:1:20 + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:4:20 | -1 | ::unknown(unknown) {} +4 | ::unknown(foo bar) {} | ^^ +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:1 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:3 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:11 + | +5 | ::unknown(foo, bar) {} + | ^^^^^^^^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:11 + | +5 | ::unknown(foo, bar) {} + | ^^^ + +error: Comma + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:14 + | +5 | ::unknown(foo, bar) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:15 + | +5 | ::unknown(foo, bar) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:16 + | +5 | ::unknown(foo, bar) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:5:21 + | +5 | ::unknown(foo, bar) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:1 + | +6 | ::unknown([foo]) {} + | ^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:3 + | +6 | ::unknown([foo]) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:11 + | +6 | ::unknown([foo]) {} + | ^^^^^ + +error: LBracket + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:11 + | +6 | ::unknown([foo]) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:12 + | +6 | ::unknown([foo]) {} + | ^^^ + +error: RBracket + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:15 + | +6 | ::unknown([foo]) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:6:18 + | +6 | ::unknown([foo]) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:1 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:3 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:11 + | +7 | ::unknown((foo bar)) {} + | ^^^^^^^^^ + +error: LParen + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:11 + | +7 | ::unknown((foo bar)) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:12 + | +7 | ::unknown((foo bar)) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:15 + | +7 | ::unknown((foo bar)) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:16 + | +7 | ::unknown((foo bar)) {} + | ^^^ + +error: RParen + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:19 + | +7 | ::unknown((foo bar)) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:7:22 + | +7 | ::unknown((foo bar)) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:1 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:3 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:11 + | +8 | ::unknown(((foo bar))) {} + | ^^^^^^^^^^^ + +error: LParen + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:11 + | +8 | ::unknown(((foo bar))) {} + | ^ + +error: LParen + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:12 + | +8 | ::unknown(((foo bar))) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:13 + | +8 | ::unknown(((foo bar))) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:16 + | +8 | ::unknown(((foo bar))) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:17 + | +8 | ::unknown(((foo bar))) {} + | ^^^ + +error: RParen + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:20 + | +8 | ::unknown(((foo bar))) {} + | ^ + +error: RParen + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:21 + | +8 | ::unknown(((foo bar))) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:8:24 + | +8 | ::unknown(((foo bar))) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:1 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:3 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:11 + | +9 | ::unknown({foo: bar}) {} + | ^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:11 + | +9 | ::unknown({foo: bar}) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:12 + | +9 | ::unknown({foo: bar}) {} + | ^^^ + +error: Colon + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:15 + | +9 | ::unknown({foo: bar}) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:16 + | +9 | ::unknown({foo: bar}) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:17 + | +9 | ::unknown({foo: bar}) {} + | ^^^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:20 + | +9 | ::unknown({foo: bar}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:9:23 + | +9 | ::unknown({foo: bar}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:1 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:3 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:11 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:11 + | +10 | ::unknown({{foo: bar}}) {} + | ^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:12 + | +10 | ::unknown({{foo: bar}}) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:13 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^ + +error: Colon + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:16 + | +10 | ::unknown({{foo: bar}}) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:17 + | +10 | ::unknown({{foo: bar}}) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:18 + | +10 | ::unknown({{foo: bar}}) {} + | ^^^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:21 + | +10 | ::unknown({{foo: bar}}) {} + | ^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:22 + | +10 | ::unknown({{foo: bar}}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:10:25 + | +10 | ::unknown({{foo: bar}}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:1 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:3 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:11 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^^^^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:11 + | +11 | ::unknown({foo: bar !important}) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:12 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^ + +error: Colon + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:15 + | +11 | ::unknown({foo: bar !important}) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:16 + | +11 | ::unknown({foo: bar !important}) {} + | ^ + +error: Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:17 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:20 + | +11 | ::unknown({foo: bar !important}) {} + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:21 + | +11 | ::unknown({foo: bar !important}) {} + | ^ + +error: Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:22 + | +11 | ::unknown({foo: bar !important}) {} + | ^^^^^^^^^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:31 + | +11 | ::unknown({foo: bar !important}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:11:34 + | +11 | ::unknown({foo: bar !important}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:1 + | +12 | ::unknown("string") {} + | ^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:3 + | +12 | ::unknown("string") {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:11 + | +12 | ::unknown("string") {} + | ^^^^^^^^ + +error: Str { value: Atom('string' type=static), raw: Atom('"string"' type=dynamic) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:11 + | +12 | ::unknown("string") {} + | ^^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:12:21 + | +12 | ::unknown("string") {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:1 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:3 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:11 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^^^^^^ + +error: Str { value: Atom('string' type=static), raw: Atom('"string"' type=dynamic) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:11 + | +13 | ::unknown("string", foo) {} + | ^^^^^^^^ + +error: Comma + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:19 + | +13 | ::unknown("string", foo) {} + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:20 + | +13 | ::unknown("string", foo) {} + | ^ + +error: Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:21 + | +13 | ::unknown("string", foo) {} + | ^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:13:26 + | +13 | ::unknown("string", foo) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:1 + | +14 | ::unknown('string') {} + | ^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:3 + | +14 | ::unknown('string') {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:11 + | +14 | ::unknown('string') {} + | ^^^^^^^^ + +error: Str { value: Atom('string' type=static), raw: Atom(''string'' type=dynamic) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:11 + | +14 | ::unknown('string') {} + | ^^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:14:21 + | +14 | ::unknown('string') {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:1 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:3 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:11 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^ + +error: Url { value: Atom('foo.png' type=inline), raw: Atom('foo.png' type=inline) } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:11 + | +15 | ::unknown(url(foo.png)) {} + | ^^^^^^^^^^^^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:15:25 + | +15 | ::unknown(url(foo.png)) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:1 + | +16 | ::unknown({!}) {} + | ^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:3 + | +16 | ::unknown({!}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:11 + | +16 | ::unknown({!}) {} + | ^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:11 + | +16 | ::unknown({!}) {} + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:12 + | +16 | ::unknown({!}) {} + | ^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:13 + | +16 | ::unknown({!}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:16:16 + | +16 | ::unknown({!}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:1 + | +17 | ::unknown(!) {} + | ^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:3 + | +17 | ::unknown(!) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:11 + | +17 | ::unknown(!) {} + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:11 + | +17 | ::unknown(!) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:17:14 + | +17 | ::unknown(!) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:1 + | +18 | ::unknown({;}) {} + | ^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:3 + | +18 | ::unknown({;}) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:11 + | +18 | ::unknown({;}) {} + | ^^^ + +error: LBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:11 + | +18 | ::unknown({;}) {} + | ^ + +error: Semi + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:12 + | +18 | ::unknown({;}) {} + | ^ + +error: RBrace + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:13 + | +18 | ::unknown({;}) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:18:16 + | +18 | ::unknown({;}) {} + | ^^ + +error: Rule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^ + +error: PseudoElementSelector + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:1 + | +19 | ::unknown(;) {} + | ^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:3 + | +19 | ::unknown(;) {} + | ^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:11 + | +19 | ::unknown(;) {} + | ^ + +error: Semi + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:11 + | +19 | ::unknown(;) {} + | ^ + +error: Block + --> $DIR/tests/fixture/selector/pseudo-element/unknown/input.css:19:14 + | +19 | ::unknown(;) {} + | ^^ + diff --git a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/output.json b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/output.json index c15d5ad6def2..d2a9633d76a6 100644 --- a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/output.json +++ b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/output.json @@ -163,8 +163,8 @@ }, { "span": { - "start": 15, - "end": 19, + "start": 24, + "end": 25, "ctxt": 0 }, "token": "RParen" diff --git a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug index c4c33fc88058..27849ab1858f 100644 --- a/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/styled-jsx/selector/2/span.rust-debug @@ -119,10 +119,10 @@ error: Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } | ^^^^ error: RParen - --> $DIR/tests/fixture/styled-jsx/selector/2/input.css:1:16 + --> $DIR/tests/fixture/styled-jsx/selector/2/input.css:1:25 | 1 | p :global(span:not(.test)) { - | ^^^^ + | ^ error: Block --> $DIR/tests/fixture/styled-jsx/selector/2/input.css:1:28 diff --git a/crates/swc_css_parser/tests/fixture/value/custom-property/input.css b/crates/swc_css_parser/tests/fixture/value/custom-property/input.css index 94d84a78199c..e5a7abb4f24a 100644 --- a/crates/swc_css_parser/tests/fixture/value/custom-property/input.css +++ b/crates/swc_css_parser/tests/fixture/value/custom-property/input.css @@ -1,4 +1,19 @@ :root { + --:value; + + --important:value!important; + --important1: value!important; + --important2: value !important; + --important3:value !important; + --important4: calc(1)!important; + + --empty: ; + --empty2: /**/; + --empty3: !important; + --empty4:/**/ !important; + --empty5:/* 1 */ /* 2 */; + + --no-whitespace:ident; --number: 1; --unit: 100vw; --color: #06c; @@ -10,12 +25,30 @@ --string: "double quoted string"; --square-block: [1, 2, 3]; + --square-block1: []; + --square-block2:[]; --round-block: (1, 2, 3); - + --round-block1: (); + --round-block2:(); --bracket-block: {1, 2, 3}; + --bracket-block1: {}; + --bracket-block2:{}; + + --JSON: [1, "2", {"three": {"a":1}}, [4]]; --javascript: function(rule) { console.log(rule) }; --CDO: ; + + --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + --fake-important:{!important}; + --semicolon-not-top-level: (;); + --delim-not-top-level: (!); +} + +:root{--a:1} +:root {--foo: } +:root { + --foo: } diff --git a/crates/swc_css_parser/tests/fixture/value/custom-property/output.json b/crates/swc_css_parser/tests/fixture/value/custom-property/output.json index ddda559f7552..fd64e423f615 100644 --- a/crates/swc_css_parser/tests/fixture/value/custom-property/output.json +++ b/crates/swc_css_parser/tests/fixture/value/custom-property/output.json @@ -2,7 +2,7 @@ "type": "Stylesheet", "span": { "start": 0, - "end": 433, + "end": 1133, "ctxt": 0 }, "rules": [ @@ -10,7 +10,7 @@ "type": "QualifiedRule", "span": { "start": 0, - "end": 432, + "end": 1080, "ctxt": 0 }, "prelude": { @@ -68,7 +68,7 @@ "type": "Block", "span": { "start": 6, - "end": 432, + "end": 1080, "ctxt": 0 }, "items": [ @@ -76,29 +76,42 @@ "type": "Declaration", "span": { "start": 12, - "end": 23, + "end": 20, "ctxt": 0 }, "property": { "type": "Identifier", "span": { "start": 12, - "end": 20, + "end": 14, "ctxt": 0 }, - "value": "--number", - "raw": "--number" + "value": "--", + "raw": "--" }, "value": [ { - "type": "Number", + "type": "Tokens", "span": { - "start": 22, - "end": 23, + "start": 15, + "end": 20, "ctxt": 0 }, - "value": 1.0, - "raw": "1" + "tokens": [ + { + "span": { + "start": 15, + "end": 20, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "value", + "raw": "value" + } + } + } + ] } ], "important": null @@ -106,261 +119,363 @@ { "type": "Declaration", "span": { - "start": 29, - "end": 42, + "start": 27, + "end": 54, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 29, - "end": 35, + "start": 27, + "end": 38, "ctxt": 0 }, - "value": "--unit", - "raw": "--unit" + "value": "--important", + "raw": "--important" }, "value": [ { - "type": "UnitValue", + "type": "Tokens", "span": { - "start": 37, - "end": 42, + "start": 39, + "end": 44, "ctxt": 0 }, - "value": { - "type": "Number", - "span": { - "start": 37, - "end": 40, - "ctxt": 0 - }, - "value": 100.0, - "raw": "100" - }, - "unit": { - "span": { - "start": 40, - "end": 42, - "ctxt": 0 - }, - "value": "vw", - "raw": "vw" - } + "tokens": [ + { + "span": { + "start": 39, + "end": 44, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "value", + "raw": "value" + } + } + } + ] } ], - "important": null + "important": { + "start": 44, + "end": 54, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 48, - "end": 61, + "start": 60, + "end": 89, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 48, - "end": 55, + "start": 60, + "end": 72, "ctxt": 0 }, - "value": "--color", - "raw": "--color" + "value": "--important1", + "raw": "--important1" }, "value": [ { - "type": "HashValue", + "type": "Tokens", "span": { - "start": 57, - "end": 61, + "start": 73, + "end": 79, "ctxt": 0 }, - "value": "06c", - "raw": "06c" + "tokens": [ + { + "span": { + "start": 73, + "end": 74, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 74, + "end": 79, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "value", + "raw": "value" + } + } + } + ] } ], - "important": null + "important": { + "start": 79, + "end": 89, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 68, - "end": 91, + "start": 95, + "end": 125, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 68, - "end": 78, + "start": 95, + "end": 107, "ctxt": 0 }, - "value": "--function", - "raw": "--function" + "value": "--important2", + "raw": "--important2" }, "value": [ { - "type": "FnValue", + "type": "Tokens", "span": { - "start": 80, - "end": 91, + "start": 108, + "end": 115, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 80, - "end": 84, - "ctxt": 0 - }, - "value": "calc", - "raw": "calc" - }, - "args": [ + "tokens": [ { - "type": "BinValue", "span": { - "start": 85, - "end": 90, + "start": 108, + "end": 109, "ctxt": 0 }, - "op": "+", - "left": { - "type": "Number", - "span": { - "start": 85, - "end": 86, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 109, + "end": 114, + "ctxt": 0 }, - "right": { - "type": "Number", - "span": { - "start": 89, - "end": 90, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" + "token": { + "Ident": { + "value": "value", + "raw": "value" + } + } + }, + { + "span": { + "start": 114, + "end": 115, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } } } ] } ], - "important": null + "important": { + "start": 115, + "end": 125, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 97, - "end": 120, + "start": 131, + "end": 160, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 97, - "end": 107, + "start": 131, + "end": 143, "ctxt": 0 }, - "value": "--variable", - "raw": "--variable" + "value": "--important3", + "raw": "--important3" }, "value": [ { - "type": "FnValue", + "type": "Tokens", "span": { - "start": 109, - "end": 120, + "start": 144, + "end": 150, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 109, - "end": 112, - "ctxt": 0 - }, - "value": "var", - "raw": "var" - }, - "args": [ + "tokens": [ + { + "span": { + "start": 144, + "end": 149, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "value", + "raw": "value" + } + } + }, { - "type": "Identifier", "span": { - "start": 113, - "end": 119, + "start": 149, + "end": 150, "ctxt": 0 }, - "value": "--unit", - "raw": "--unit" + "token": { + "WhiteSpace": { + "value": " " + } + } } ] } ], - "important": null + "important": { + "start": 150, + "end": 160, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 127, - "end": 159, + "start": 166, + "end": 197, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 127, - "end": 135, + "start": 166, + "end": 178, "ctxt": 0 }, - "value": "--string", - "raw": "--string" + "value": "--important4", + "raw": "--important4" }, "value": [ { - "type": "String", + "type": "Tokens", "span": { - "start": 137, - "end": 159, + "start": 179, + "end": 187, "ctxt": 0 }, - "value": "single quoted string", - "raw": "'single quoted string'" + "tokens": [ + { + "span": { + "start": 179, + "end": 180, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 180, + "end": 185, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "calc", + "raw": "calc" + } + } + }, + { + "span": { + "start": 185, + "end": 186, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 186, + "end": 187, + "ctxt": 0 + }, + "token": "RParen" + } + ] } ], - "important": null + "important": { + "start": 187, + "end": 197, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 165, - "end": 197, + "start": 204, + "end": 213, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 165, - "end": 173, + "start": 204, + "end": 211, "ctxt": 0 }, - "value": "--string", - "raw": "--string" + "value": "--empty", + "raw": "--empty" }, "value": [ { - "type": "String", + "type": "Tokens", "span": { - "start": 175, - "end": 197, + "start": 212, + "end": 213, "ctxt": 0 }, - "value": "double quoted string", - "raw": "\"double quoted string\"" + "tokens": [ + { + "span": { + "start": 212, + "end": 213, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + } + ] } ], "important": null @@ -368,68 +483,40 @@ { "type": "Declaration", "span": { - "start": 204, + "start": 219, "end": 229, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 204, - "end": 218, + "start": 219, + "end": 227, "ctxt": 0 }, - "value": "--square-block", - "raw": "--square-block" + "value": "--empty2", + "raw": "--empty2" }, "value": [ { - "type": "SquareBracketBlock", + "type": "Tokens", "span": { - "start": 220, + "start": 228, "end": 229, "ctxt": 0 }, - "children": [ + "tokens": [ { - "type": "CommaValues", "span": { - "start": 221, - "end": 228, + "start": 228, + "end": 229, "ctxt": 0 }, - "values": [ - { - "type": "Number", - "span": { - "start": 221, - "end": 222, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" - }, - { - "type": "Number", - "span": { - "start": 224, - "end": 225, - "ctxt": 0 - }, - "value": 2.0, - "raw": "2" - }, - { - "type": "Number", - "span": { - "start": 227, - "end": 228, - "ctxt": 0 - }, - "value": 3.0, - "raw": "3" + "token": { + "WhiteSpace": { + "value": " " } - ] + } } ] } @@ -439,368 +526,134 @@ { "type": "Declaration", "span": { - "start": 235, + "start": 239, "end": 259, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 235, - "end": 248, + "start": 239, + "end": 247, "ctxt": 0 }, - "value": "--round-block", - "raw": "--round-block" + "value": "--empty3", + "raw": "--empty3" }, "value": [ { - "type": "RoundBracketBlock", + "type": "Tokens", "span": { - "start": 250, - "end": 259, + "start": 248, + "end": 249, "ctxt": 0 }, - "children": [ + "tokens": [ { - "type": "CommaValues", "span": { - "start": 251, - "end": 258, + "start": 248, + "end": 249, "ctxt": 0 }, - "values": [ - { - "type": "Number", - "span": { - "start": 251, - "end": 252, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" - }, - { - "type": "Number", - "span": { - "start": 254, - "end": 255, - "ctxt": 0 - }, - "value": 2.0, - "raw": "2" - }, - { - "type": "Number", - "span": { - "start": 257, - "end": 258, - "ctxt": 0 - }, - "value": 3.0, - "raw": "3" + "token": { + "WhiteSpace": { + "value": " " } - ] + } } ] } ], - "important": null + "important": { + "start": 249, + "end": 259, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 266, - "end": 292, + "start": 265, + "end": 289, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 266, - "end": 281, + "start": 265, + "end": 273, "ctxt": 0 }, - "value": "--bracket-block", - "raw": "--bracket-block" + "value": "--empty4", + "raw": "--empty4" }, "value": [ { - "type": "BraceValue", + "type": "Tokens", "span": { - "start": 283, - "end": 292, + "start": 278, + "end": 279, "ctxt": 0 }, - "value": { - "type": "Tokens", - "span": { - "start": 284, - "end": 291, - "ctxt": 0 - }, - "tokens": [ - { - "span": { - "start": 284, - "end": 285, - "ctxt": 0 - }, - "token": { - "Num": { - "value": 1.0, - "raw": "1" - } - } - }, - { - "span": { - "start": 285, - "end": 286, - "ctxt": 0 - }, - "token": "Comma" - }, - { - "span": { - "start": 286, - "end": 287, - "ctxt": 0 - }, - "token": { - "WhiteSpace": { - "value": " " - } - } - }, - { - "span": { - "start": 287, - "end": 288, - "ctxt": 0 - }, - "token": { - "Num": { - "value": 2.0, - "raw": "2" - } - } - }, - { - "span": { - "start": 288, - "end": 289, - "ctxt": 0 - }, - "token": "Comma" - }, - { - "span": { - "start": 289, - "end": 290, - "ctxt": 0 - }, - "token": { - "WhiteSpace": { - "value": " " - } - } + "tokens": [ + { + "span": { + "start": 278, + "end": 279, + "ctxt": 0 }, - { - "span": { - "start": 290, - "end": 291, - "ctxt": 0 - }, - "token": { - "Num": { - "value": 3.0, - "raw": "3" - } + "token": { + "WhiteSpace": { + "value": " " } } - ] - } + } + ] } ], - "important": null + "important": { + "start": 279, + "end": 289, + "ctxt": 0 + } }, { "type": "Declaration", "span": { - "start": 298, - "end": 339, + "start": 295, + "end": 312, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 298, - "end": 304, + "start": 295, + "end": 303, "ctxt": 0 }, - "value": "--JSON", - "raw": "--JSON" + "value": "--empty5", + "raw": "--empty5" }, "value": [ { - "type": "SquareBracketBlock", + "type": "Tokens", "span": { - "start": 306, - "end": 339, + "start": 311, + "end": 312, "ctxt": 0 }, - "children": [ + "tokens": [ { - "type": "CommaValues", "span": { - "start": 307, - "end": 338, + "start": 311, + "end": 312, "ctxt": 0 }, - "values": [ - { - "type": "Number", - "span": { - "start": 307, - "end": 308, - "ctxt": 0 - }, - "value": 1.0, - "raw": "1" - }, - { - "type": "String", - "span": { - "start": 310, - "end": 313, - "ctxt": 0 - }, - "value": "2", - "raw": "\"2\"" - }, - { - "type": "BraceValue", - "span": { - "start": 315, - "end": 333, - "ctxt": 0 - }, - "value": { - "type": "Tokens", - "span": { - "start": 316, - "end": 332, - "ctxt": 0 - }, - "tokens": [ - { - "span": { - "start": 316, - "end": 323, - "ctxt": 0 - }, - "token": { - "Str": { - "value": "three", - "raw": "\"three\"" - } - } - }, - { - "span": { - "start": 323, - "end": 324, - "ctxt": 0 - }, - "token": "Colon" - }, - { - "span": { - "start": 324, - "end": 325, - "ctxt": 0 - }, - "token": { - "WhiteSpace": { - "value": " " - } - } - }, - { - "span": { - "start": 325, - "end": 326, - "ctxt": 0 - }, - "token": "LBrace" - }, - { - "span": { - "start": 326, - "end": 329, - "ctxt": 0 - }, - "token": { - "Str": { - "value": "a", - "raw": "\"a\"" - } - } - }, - { - "span": { - "start": 329, - "end": 330, - "ctxt": 0 - }, - "token": "Colon" - }, - { - "span": { - "start": 330, - "end": 331, - "ctxt": 0 - }, - "token": { - "Num": { - "value": 1.0, - "raw": "1" - } - } - }, - { - "span": { - "start": 331, - "end": 332, - "ctxt": 0 - }, - "token": "RBrace" - } - ] - } - }, - { - "type": "SquareBracketBlock", - "span": { - "start": 335, - "end": 338, - "ctxt": 0 - }, - "children": [ - { - "type": "Number", - "span": { - "start": 336, - "end": 337, - "ctxt": 0 - }, - "value": 4.0, - "raw": "4" - } - ] - } - ] + "token": { + "WhiteSpace": { + "value": " " + } + } } ] } @@ -810,151 +663,340 @@ { "type": "Declaration", "span": { - "start": 345, - "end": 395, + "start": 326, + "end": 347, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 345, - "end": 357, + "start": 326, + "end": 341, "ctxt": 0 }, - "value": "--javascript", - "raw": "--javascript" + "value": "--no-whitespace", + "raw": "--no-whitespace" }, "value": [ { - "type": "FnValue", + "type": "Tokens", "span": { - "start": 359, - "end": 373, + "start": 342, + "end": 347, "ctxt": 0 }, - "name": { - "type": "Identifier", - "span": { - "start": 359, - "end": 367, - "ctxt": 0 - }, - "value": "function", - "raw": "function" - }, - "args": [ + "tokens": [ { - "type": "Identifier", "span": { - "start": 368, - "end": 372, + "start": 342, + "end": 347, "ctxt": 0 }, - "value": "rule", - "raw": "rule" + "token": { + "Ident": { + "value": "ident", + "raw": "ident" + } + } } ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 353, + "end": 363, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 353, + "end": 361, + "ctxt": 0 }, + "value": "--number", + "raw": "--number" + }, + "value": [ { - "type": "BraceValue", + "type": "Tokens", "span": { - "start": 374, - "end": 395, + "start": 362, + "end": 364, "ctxt": 0 }, - "value": { - "type": "Tokens", - "span": { - "start": 375, - "end": 394, - "ctxt": 0 - }, - "tokens": [ - { - "span": { - "start": 375, - "end": 376, - "ctxt": 0 - }, - "token": { - "WhiteSpace": { - "value": " " - } + "tokens": [ + { + "span": { + "start": 362, + "end": 363, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " } + } + }, + { + "span": { + "start": 363, + "end": 364, + "ctxt": 0 }, - { - "span": { - "start": 376, - "end": 383, - "ctxt": 0 - }, - "token": { - "Ident": { - "value": "console", - "raw": "console" - } + "token": { + "Num": { + "value": 1.0, + "raw": "1" } + } + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 370, + "end": 378, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 370, + "end": 376, + "ctxt": 0 + }, + "value": "--unit", + "raw": "--unit" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 377, + "end": 383, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 377, + "end": 378, + "ctxt": 0 }, - { - "span": { - "start": 383, - "end": 384, - "ctxt": 0 - }, - "token": { - "Delim": { - "value": "." - } + "token": { + "WhiteSpace": { + "value": " " } + } + }, + { + "span": { + "start": 378, + "end": 383, + "ctxt": 0 }, - { - "span": { - "start": 384, - "end": 388, - "ctxt": 0 - }, - "token": { - "Function": { - "value": "log", - "raw": "log" - } + "token": { + "Dimension": { + "value": 100.0, + "raw_value": "100", + "unit": "vw", + "raw_unit": "vw" } + } + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 389, + "end": 398, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 389, + "end": 396, + "ctxt": 0 + }, + "value": "--color", + "raw": "--color" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 397, + "end": 402, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 397, + "end": 398, + "ctxt": 0 }, - { - "span": { - "start": 388, - "end": 392, - "ctxt": 0 - }, - "token": { - "Ident": { - "value": "rule", - "raw": "rule" - } + "token": { + "WhiteSpace": { + "value": " " } + } + }, + { + "span": { + "start": 398, + "end": 402, + "ctxt": 0 }, - { - "span": { - "start": 392, - "end": 393, - "ctxt": 0 - }, - "token": "RParen" + "token": { + "Hash": { + "is_id": false, + "value": "06c", + "raw": "06c" + } + } + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 409, + "end": 421, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 409, + "end": 419, + "ctxt": 0 + }, + "value": "--function", + "raw": "--function" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 420, + "end": 432, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 420, + "end": 421, + "ctxt": 0 }, - { - "span": { - "start": 393, - "end": 394, - "ctxt": 0 - }, - "token": { - "WhiteSpace": { - "value": " " - } + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 421, + "end": 426, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "calc", + "raw": "calc" + } + } + }, + { + "span": { + "start": 426, + "end": 427, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 427, + "end": 428, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 428, + "end": 429, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "+" + } + } + }, + { + "span": { + "start": 429, + "end": 430, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 430, + "end": 431, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" } } - ] - } + }, + { + "span": { + "start": 431, + "end": 432, + "ctxt": 0 + }, + "token": "RParen" + } + ] } ], "important": null @@ -962,36 +1004,74 @@ { "type": "Declaration", "span": { - "start": 402, - "end": 413, + "start": 438, + "end": 450, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 402, - "end": 407, + "start": 438, + "end": 448, "ctxt": 0 }, - "value": "--CDO", - "raw": "--CDO" + "value": "--variable", + "raw": "--variable" }, "value": [ { "type": "Tokens", "span": { - "start": 409, - "end": 413, + "start": 449, + "end": 461, "ctxt": 0 }, "tokens": [ { "span": { - "start": 409, - "end": 413, + "start": 449, + "end": 450, "ctxt": 0 }, - "token": "CDO" + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 450, + "end": 454, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "var", + "raw": "var" + } + } + }, + { + "span": { + "start": 454, + "end": 460, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "--unit", + "raw": "--unit" + } + } + }, + { + "span": { + "start": 460, + "end": 461, + "ctxt": 0 + }, + "token": "RParen" } ] } @@ -1001,36 +1081,2222 @@ { "type": "Declaration", "span": { - "start": 419, - "end": 429, + "start": 468, + "end": 478, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 419, - "end": 424, + "start": 468, + "end": 476, "ctxt": 0 }, - "value": "--CDC", - "raw": "--CDC" + "value": "--string", + "raw": "--string" }, "value": [ { "type": "Tokens", "span": { - "start": 426, - "end": 429, + "start": 477, + "end": 500, "ctxt": 0 }, "tokens": [ { "span": { - "start": 426, - "end": 429, + "start": 477, + "end": 478, "ctxt": 0 }, - "token": "CDC" + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 478, + "end": 500, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "single quoted string", + "raw": "'single quoted string'" + } + } + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 506, + "end": 516, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 506, + "end": 514, + "ctxt": 0 + }, + "value": "--string", + "raw": "--string" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 515, + "end": 538, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 515, + "end": 516, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 516, + "end": 538, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "double quoted string", + "raw": "\"double quoted string\"" + } + } + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 545, + "end": 561, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 545, + "end": 559, + "ctxt": 0 + }, + "value": "--square-block", + "raw": "--square-block" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 560, + "end": 570, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 560, + "end": 561, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 561, + "end": 562, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 562, + "end": 563, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 563, + "end": 564, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 564, + "end": 565, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 565, + "end": 566, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 2.0, + "raw": "2" + } + } + }, + { + "span": { + "start": 566, + "end": 567, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 567, + "end": 568, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 568, + "end": 569, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 3.0, + "raw": "3" + } + } + }, + { + "span": { + "start": 569, + "end": 570, + "ctxt": 0 + }, + "token": "RBracket" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 576, + "end": 593, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 576, + "end": 591, + "ctxt": 0 + }, + "value": "--square-block1", + "raw": "--square-block1" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 592, + "end": 595, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 592, + "end": 593, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 593, + "end": 594, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 594, + "end": 595, + "ctxt": 0 + }, + "token": "RBracket" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 601, + "end": 618, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 601, + "end": 616, + "ctxt": 0 + }, + "value": "--square-block2", + "raw": "--square-block2" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 617, + "end": 619, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 617, + "end": 618, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 618, + "end": 619, + "ctxt": 0 + }, + "token": "RBracket" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 625, + "end": 640, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 625, + "end": 638, + "ctxt": 0 + }, + "value": "--round-block", + "raw": "--round-block" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 639, + "end": 649, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 639, + "end": 640, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 640, + "end": 641, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 641, + "end": 642, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 642, + "end": 643, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 643, + "end": 644, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 644, + "end": 645, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 2.0, + "raw": "2" + } + } + }, + { + "span": { + "start": 645, + "end": 646, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 646, + "end": 647, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 647, + "end": 648, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 3.0, + "raw": "3" + } + } + }, + { + "span": { + "start": 648, + "end": 649, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 655, + "end": 671, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 655, + "end": 669, + "ctxt": 0 + }, + "value": "--round-block1", + "raw": "--round-block1" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 670, + "end": 673, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 670, + "end": 671, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 671, + "end": 672, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 672, + "end": 673, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 679, + "end": 695, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 679, + "end": 693, + "ctxt": 0 + }, + "value": "--round-block2", + "raw": "--round-block2" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 694, + "end": 696, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 694, + "end": 695, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 695, + "end": 696, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 702, + "end": 719, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 702, + "end": 717, + "ctxt": 0 + }, + "value": "--bracket-block", + "raw": "--bracket-block" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 718, + "end": 728, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 718, + "end": 719, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 719, + "end": 720, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 720, + "end": 721, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 721, + "end": 722, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 722, + "end": 723, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 723, + "end": 724, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 2.0, + "raw": "2" + } + } + }, + { + "span": { + "start": 724, + "end": 725, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 725, + "end": 726, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 726, + "end": 727, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 3.0, + "raw": "3" + } + } + }, + { + "span": { + "start": 727, + "end": 728, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 734, + "end": 752, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 734, + "end": 750, + "ctxt": 0 + }, + "value": "--bracket-block1", + "raw": "--bracket-block1" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 751, + "end": 754, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 751, + "end": 752, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 752, + "end": 753, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 753, + "end": 754, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 760, + "end": 778, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 760, + "end": 776, + "ctxt": 0 + }, + "value": "--bracket-block2", + "raw": "--bracket-block2" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 777, + "end": 779, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 777, + "end": 778, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 778, + "end": 779, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 787, + "end": 795, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 787, + "end": 793, + "ctxt": 0 + }, + "value": "--JSON", + "raw": "--JSON" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 794, + "end": 828, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 794, + "end": 795, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 795, + "end": 796, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 796, + "end": 797, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 797, + "end": 798, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 798, + "end": 799, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 799, + "end": 802, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "2", + "raw": "\"2\"" + } + } + }, + { + "span": { + "start": 802, + "end": 803, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 803, + "end": 804, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 804, + "end": 805, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 805, + "end": 812, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "three", + "raw": "\"three\"" + } + } + }, + { + "span": { + "start": 812, + "end": 813, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 813, + "end": 814, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 814, + "end": 815, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 815, + "end": 818, + "ctxt": 0 + }, + "token": { + "Str": { + "value": "a", + "raw": "\"a\"" + } + } + }, + { + "span": { + "start": 818, + "end": 819, + "ctxt": 0 + }, + "token": "Colon" + }, + { + "span": { + "start": 819, + "end": 820, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + }, + { + "span": { + "start": 820, + "end": 821, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 821, + "end": 822, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 822, + "end": 823, + "ctxt": 0 + }, + "token": "Comma" + }, + { + "span": { + "start": 823, + "end": 824, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 824, + "end": 825, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 825, + "end": 826, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 4.0, + "raw": "4" + } + } + }, + { + "span": { + "start": 826, + "end": 827, + "ctxt": 0 + }, + "token": "RBracket" + }, + { + "span": { + "start": 827, + "end": 828, + "ctxt": 0 + }, + "token": "RBracket" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 834, + "end": 848, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 834, + "end": 846, + "ctxt": 0 + }, + "value": "--javascript", + "raw": "--javascript" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 847, + "end": 884, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 847, + "end": 848, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 848, + "end": 857, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "function", + "raw": "function" + } + } + }, + { + "span": { + "start": 857, + "end": 861, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "rule", + "raw": "rule" + } + } + }, + { + "span": { + "start": 861, + "end": 862, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 862, + "end": 863, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 863, + "end": 864, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 864, + "end": 865, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 865, + "end": 872, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "console", + "raw": "console" + } + } + }, + { + "span": { + "start": 872, + "end": 873, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "." + } + } + }, + { + "span": { + "start": 873, + "end": 877, + "ctxt": 0 + }, + "token": { + "Function": { + "value": "log", + "raw": "log" + } + } + }, + { + "span": { + "start": 877, + "end": 881, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "rule", + "raw": "rule" + } + } + }, + { + "span": { + "start": 881, + "end": 882, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 882, + "end": 883, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 883, + "end": 884, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 891, + "end": 898, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 891, + "end": 896, + "ctxt": 0 + }, + "value": "--CDO", + "raw": "--CDO" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 897, + "end": 902, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 897, + "end": 898, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 898, + "end": 902, + "ctxt": 0 + }, + "token": "CDO" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 908, + "end": 915, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 908, + "end": 913, + "ctxt": 0 + }, + "value": "--CDC", + "raw": "--CDC" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 914, + "end": 918, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 914, + "end": 915, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 915, + "end": 918, + "ctxt": 0 + }, + "token": "CDC" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 925, + "end": 945, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 925, + "end": 943, + "ctxt": 0 + }, + "value": "--complex-balanced", + "raw": "--complex-balanced" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 944, + "end": 974, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 944, + "end": 945, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 945, + "end": 946, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 946, + "end": 947, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 947, + "end": 948, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 948, + "end": 949, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 949, + "end": 950, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 950, + "end": 951, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 951, + "end": 952, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 952, + "end": 953, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 953, + "end": 954, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 954, + "end": 955, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 955, + "end": 956, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 956, + "end": 957, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 957, + "end": 958, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 958, + "end": 959, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 959, + "end": 960, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 960, + "end": 961, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 961, + "end": 962, + "ctxt": 0 + }, + "token": "RBracket" + }, + { + "span": { + "start": 962, + "end": 963, + "ctxt": 0 + }, + "token": "RBracket" + }, + { + "span": { + "start": 963, + "end": 964, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 964, + "end": 965, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 965, + "end": 966, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 966, + "end": 967, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 967, + "end": 968, + "ctxt": 0 + }, + "token": "RParen" + }, + { + "span": { + "start": 968, + "end": 969, + "ctxt": 0 + }, + "token": "RBrace" + }, + { + "span": { + "start": 969, + "end": 970, + "ctxt": 0 + }, + "token": "RBracket" + }, + { + "span": { + "start": 970, + "end": 971, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 971, + "end": 972, + "ctxt": 0 + }, + "token": "LBracket" + }, + { + "span": { + "start": 972, + "end": 973, + "ctxt": 0 + }, + "token": "RBracket" + }, + { + "span": { + "start": 973, + "end": 974, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 980, + "end": 998, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 980, + "end": 996, + "ctxt": 0 + }, + "value": "--fake-important", + "raw": "--fake-important" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 997, + "end": 1009, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 997, + "end": 998, + "ctxt": 0 + }, + "token": "LBrace" + }, + { + "span": { + "start": 998, + "end": 999, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + }, + { + "span": { + "start": 999, + "end": 1008, + "ctxt": 0 + }, + "token": { + "Ident": { + "value": "important", + "raw": "important" + } + } + }, + { + "span": { + "start": 1008, + "end": 1009, + "ctxt": 0 + }, + "token": "RBrace" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 1015, + "end": 1042, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 1015, + "end": 1040, + "ctxt": 0 + }, + "value": "--semicolon-not-top-level", + "raw": "--semicolon-not-top-level" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 1041, + "end": 1045, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 1041, + "end": 1042, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 1042, + "end": 1043, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 1043, + "end": 1044, + "ctxt": 0 + }, + "token": "Semi" + }, + { + "span": { + "start": 1044, + "end": 1045, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 1051, + "end": 1074, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 1051, + "end": 1072, + "ctxt": 0 + }, + "value": "--delim-not-top-level", + "raw": "--delim-not-top-level" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 1073, + "end": 1077, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 1073, + "end": 1074, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + }, + { + "span": { + "start": 1074, + "end": 1075, + "ctxt": 0 + }, + "token": "LParen" + }, + { + "span": { + "start": 1075, + "end": 1076, + "ctxt": 0 + }, + "token": { + "Delim": { + "value": "!" + } + } + }, + { + "span": { + "start": 1076, + "end": 1077, + "ctxt": 0 + }, + "token": "RParen" + } + ] + } + ], + "important": null + } + ] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 1082, + "end": 1094, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 1082, + "end": 1087, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 1082, + "end": 1087, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 1082, + "end": 1087, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 1082, + "end": 1087, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1083, + "end": 1087, + "ctxt": 0 + }, + "value": "root", + "raw": "root" + }, + "children": null + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 1087, + "end": 1094, + "ctxt": 0 + }, + "items": [ + { + "type": "Declaration", + "span": { + "start": 1088, + "end": 1093, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 1088, + "end": 1091, + "ctxt": 0 + }, + "value": "--a", + "raw": "--a" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 1092, + "end": 1093, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 1092, + "end": 1093, + "ctxt": 0 + }, + "token": { + "Num": { + "value": 1.0, + "raw": "1" + } + } + } + ] + } + ], + "important": null + } + ] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 1095, + "end": 1110, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 1095, + "end": 1100, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 1095, + "end": 1100, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 1095, + "end": 1100, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 1095, + "end": 1100, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1096, + "end": 1100, + "ctxt": 0 + }, + "value": "root", + "raw": "root" + }, + "children": null + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 1101, + "end": 1110, + "ctxt": 0 + }, + "items": [ + { + "type": "Declaration", + "span": { + "start": 1102, + "end": 1109, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 1102, + "end": 1107, + "ctxt": 0 + }, + "value": "--foo", + "raw": "--foo" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 1108, + "end": 1109, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 1108, + "end": 1109, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " " + } + } + } + ] + } + ], + "important": null + } + ] + } + }, + { + "type": "QualifiedRule", + "span": { + "start": 1111, + "end": 1132, + "ctxt": 0 + }, + "prelude": { + "type": "SelectorList", + "span": { + "start": 1111, + "end": 1116, + "ctxt": 0 + }, + "children": [ + { + "type": "ComplexSelector", + "span": { + "start": 1111, + "end": 1116, + "ctxt": 0 + }, + "children": [ + { + "type": "CompoundSelector", + "span": { + "start": 1111, + "end": 1116, + "ctxt": 0 + }, + "nestingSelector": null, + "typeSelector": null, + "subclassSelectors": [ + { + "type": "PseudoClassSelector", + "span": { + "start": 1111, + "end": 1116, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1112, + "end": 1116, + "ctxt": 0 + }, + "value": "root", + "raw": "root" + }, + "children": null + } + ] + } + ] + } + ] + }, + "block": { + "type": "Block", + "span": { + "start": 1117, + "end": 1132, + "ctxt": 0 + }, + "items": [ + { + "type": "Declaration", + "span": { + "start": 1123, + "end": 1131, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 1123, + "end": 1128, + "ctxt": 0 + }, + "value": "--foo", + "raw": "--foo" + }, + "value": [ + { + "type": "Tokens", + "span": { + "start": 1129, + "end": 1131, + "ctxt": 0 + }, + "tokens": [ + { + "span": { + "start": 1129, + "end": 1131, + "ctxt": 0 + }, + "token": { + "WhiteSpace": { + "value": " \n" + } + } } ] } diff --git a/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug index 514128c3b38b..6196ea8c9d91 100644 --- a/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/custom-property/span.rust-debug @@ -2,36 +2,36 @@ error: Stylesheet --> $DIR/tests/fixture/value/custom-property/input.css:1:1 | 1 | / :root { -2 | | --number: 1; -3 | | --unit: 100vw; -4 | | --color: #06c; +2 | | --:value; +3 | | +4 | | --important:value!important; ... | -20 | | --CDC: -->; -21 | | } +53 | | --foo: +54 | | } | |__^ error: Rule --> $DIR/tests/fixture/value/custom-property/input.css:1:1 | 1 | / :root { -2 | | --number: 1; -3 | | --unit: 100vw; -4 | | --color: #06c; +2 | | --:value; +3 | | +4 | | --important:value!important; ... | -20 | | --CDC: -->; -21 | | } +47 | | --delim-not-top-level: (!); +48 | | } | |_^ error: QualifiedRule --> $DIR/tests/fixture/value/custom-property/input.css:1:1 | 1 | / :root { -2 | | --number: 1; -3 | | --unit: 100vw; -4 | | --color: #06c; +2 | | --:value; +3 | | +4 | | --important:value!important; ... | -20 | | --CDC: -->; -21 | | } +47 | | --delim-not-top-level: (!); +48 | | } | |_^ error: SelectorList @@ -75,779 +75,2162 @@ error: Block | 1 | :root { | _______^ -2 | | --number: 1; -3 | | --unit: 100vw; -4 | | --color: #06c; +2 | | --:value; +3 | | +4 | | --important:value!important; ... | -20 | | --CDC: -->; -21 | | } +47 | | --delim-not-top-level: (!); +48 | | } | |_^ error: Declaration --> $DIR/tests/fixture/value/custom-property/input.css:2:5 | -2 | --number: 1; - | ^^^^^^^^^^^ +2 | --:value; + | ^^^^^^^^ error: Ident --> $DIR/tests/fixture/value/custom-property/input.css:2:5 | -2 | --number: 1; - | ^^^^^^^^ +2 | --:value; + | ^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:2:15 + --> $DIR/tests/fixture/value/custom-property/input.css:2:8 + | +2 | --:value; + | ^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:2:8 | -2 | --number: 1; - | ^ +2 | --:value; + | ^^^^^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:2:15 +error: Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:2:8 | -2 | --number: 1; - | ^ +2 | --:value; + | ^^^^^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:3:5 + --> $DIR/tests/fixture/value/custom-property/input.css:4:5 | -3 | --unit: 100vw; - | ^^^^^^^^^^^^^ +4 | --important:value!important; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:3:5 + --> $DIR/tests/fixture/value/custom-property/input.css:4:5 | -3 | --unit: 100vw; - | ^^^^^^ +4 | --important:value!important; + | ^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:3:13 - | -3 | --unit: 100vw; - | ^^^^^ - -error: UnitValue - --> $DIR/tests/fixture/value/custom-property/input.css:3:13 + --> $DIR/tests/fixture/value/custom-property/input.css:4:17 | -3 | --unit: 100vw; - | ^^^^^ +4 | --important:value!important; + | ^^^^^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:3:13 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:4:17 | -3 | --unit: 100vw; - | ^^^ +4 | --important:value!important; + | ^^^^^ -error: Unit - --> $DIR/tests/fixture/value/custom-property/input.css:3:16 +error: Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:4:17 | -3 | --unit: 100vw; - | ^^ +4 | --important:value!important; + | ^^^^^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:4:5 + --> $DIR/tests/fixture/value/custom-property/input.css:5:5 | -4 | --color: #06c; - | ^^^^^^^^^^^^^ +5 | --important1: value!important; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:4:5 + --> $DIR/tests/fixture/value/custom-property/input.css:5:5 | -4 | --color: #06c; - | ^^^^^^^ +5 | --important1: value!important; + | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:4:14 + --> $DIR/tests/fixture/value/custom-property/input.css:5:18 + | +5 | --important1: value!important; + | ^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:5:18 + | +5 | --important1: value!important; + | ^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:5:18 | -4 | --color: #06c; - | ^^^^ +5 | --important1: value!important; + | ^ -error: HashValue - --> $DIR/tests/fixture/value/custom-property/input.css:4:14 +error: Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:5:19 | -4 | --color: #06c; - | ^^^^ +5 | --important1: value!important; + | ^^^^^ error: Declaration --> $DIR/tests/fixture/value/custom-property/input.css:6:5 | -6 | --function: calc(1 + 1); - | ^^^^^^^^^^^^^^^^^^^^^^^ +6 | --important2: value !important; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/value/custom-property/input.css:6:5 | -6 | --function: calc(1 + 1); - | ^^^^^^^^^^ +6 | --important2: value !important; + | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:6:17 + --> $DIR/tests/fixture/value/custom-property/input.css:6:18 | -6 | --function: calc(1 + 1); - | ^^^^^^^^^^^ +6 | --important2: value !important; + | ^^^^^^^ -error: FnValue - --> $DIR/tests/fixture/value/custom-property/input.css:6:17 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:6:18 | -6 | --function: calc(1 + 1); - | ^^^^^^^^^^^ +6 | --important2: value !important; + | ^^^^^^^ -error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:6:17 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:6:18 | -6 | --function: calc(1 + 1); - | ^^^^ +6 | --important2: value !important; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:6:22 +error: Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:6:19 | -6 | --function: calc(1 + 1); - | ^^^^^ +6 | --important2: value !important; + | ^^^^^ -error: BinValue - --> $DIR/tests/fixture/value/custom-property/input.css:6:22 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:6:24 | -6 | --function: calc(1 + 1); - | ^^^^^ +6 | --important2: value !important; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:6:22 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:7:5 | -6 | --function: calc(1 + 1); - | ^ +7 | --important3:value !important; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:6:22 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:7:5 | -6 | --function: calc(1 + 1); - | ^ +7 | --important3:value !important; + | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:6:26 - | -6 | --function: calc(1 + 1); - | ^ - -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:6:26 + --> $DIR/tests/fixture/value/custom-property/input.css:7:18 | -6 | --function: calc(1 + 1); - | ^ +7 | --important3:value !important; + | ^^^^^^ -error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:7:5 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:7:18 | -7 | --variable: var(--unit); - | ^^^^^^^^^^^^^^^^^^^^^^^ +7 | --important3:value !important; + | ^^^^^^ -error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:7:5 +error: Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:7:18 | -7 | --variable: var(--unit); - | ^^^^^^^^^^ +7 | --important3:value !important; + | ^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:7:17 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:7:23 | -7 | --variable: var(--unit); - | ^^^^^^^^^^^ +7 | --important3:value !important; + | ^ -error: FnValue - --> $DIR/tests/fixture/value/custom-property/input.css:7:17 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:8:5 | -7 | --variable: var(--unit); - | ^^^^^^^^^^^ +8 | --important4: calc(1)!important; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:7:17 + --> $DIR/tests/fixture/value/custom-property/input.css:8:5 | -7 | --variable: var(--unit); - | ^^^ +8 | --important4: calc(1)!important; + | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:7:21 + --> $DIR/tests/fixture/value/custom-property/input.css:8:18 | -7 | --variable: var(--unit); - | ^^^^^^ +8 | --important4: calc(1)!important; + | ^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:7:21 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:8:18 | -7 | --variable: var(--unit); - | ^^^^^^ +8 | --important4: calc(1)!important; + | ^^^^^^^^ -error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:9:5 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:8:18 | -9 | --string: 'single quoted string'; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +8 | --important4: calc(1)!important; + | ^ -error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:9:5 +error: Function { value: Atom('calc' type=inline), raw: Atom('calc' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:8:19 | -9 | --string: 'single quoted string'; - | ^^^^^^^^ +8 | --important4: calc(1)!important; + | ^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:9:15 +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:8:24 | -9 | --string: 'single quoted string'; - | ^^^^^^^^^^^^^^^^^^^^^^ +8 | --important4: calc(1)!important; + | ^ -error: Str - --> $DIR/tests/fixture/value/custom-property/input.css:9:15 +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:8:25 | -9 | --string: 'single quoted string'; - | ^^^^^^^^^^^^^^^^^^^^^^ +8 | --important4: calc(1)!important; + | ^ error: Declaration --> $DIR/tests/fixture/value/custom-property/input.css:10:5 | -10 | --string: "double quoted string"; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10 | --empty: ; + | ^^^^^^^^^ error: Ident --> $DIR/tests/fixture/value/custom-property/input.css:10:5 | -10 | --string: "double quoted string"; - | ^^^^^^^^ +10 | --empty: ; + | ^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:10:15 + --> $DIR/tests/fixture/value/custom-property/input.css:10:13 | -10 | --string: "double quoted string"; - | ^^^^^^^^^^^^^^^^^^^^^^ +10 | --empty: ; + | ^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:10:13 + | +10 | --empty: ; + | ^ -error: Str - --> $DIR/tests/fixture/value/custom-property/input.css:10:15 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:10:13 | -10 | --string: "double quoted string"; - | ^^^^^^^^^^^^^^^^^^^^^^ +10 | --empty: ; + | ^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:12:5 + --> $DIR/tests/fixture/value/custom-property/input.css:11:5 | -12 | --square-block: [1, 2, 3]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ +11 | --empty2: /**/; + | ^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:12:5 + --> $DIR/tests/fixture/value/custom-property/input.css:11:5 | -12 | --square-block: [1, 2, 3]; - | ^^^^^^^^^^^^^^ +11 | --empty2: /**/; + | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:12:21 + --> $DIR/tests/fixture/value/custom-property/input.css:11:14 | -12 | --square-block: [1, 2, 3]; - | ^^^^^^^^^ +11 | --empty2: /**/; + | ^ -error: SquareBracketBlock - --> $DIR/tests/fixture/value/custom-property/input.css:12:21 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:11:14 | -12 | --square-block: [1, 2, 3]; - | ^^^^^^^^^ +11 | --empty2: /**/; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:12:22 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:11:14 | -12 | --square-block: [1, 2, 3]; - | ^^^^^^^ +11 | --empty2: /**/; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:12:22 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:12:5 | -12 | --square-block: [1, 2, 3]; - | ^ +12 | --empty3: !important; + | ^^^^^^^^^^^^^^^^^^^^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:12:22 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:12:5 | -12 | --square-block: [1, 2, 3]; - | ^ +12 | --empty3: !important; + | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:12:25 + --> $DIR/tests/fixture/value/custom-property/input.css:12:14 | -12 | --square-block: [1, 2, 3]; - | ^ - -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:12:25 - | -12 | --square-block: [1, 2, 3]; - | ^ +12 | --empty3: !important; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:12:28 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:12:14 | -12 | --square-block: [1, 2, 3]; - | ^ +12 | --empty3: !important; + | ^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:12:28 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:12:14 | -12 | --square-block: [1, 2, 3]; - | ^ +12 | --empty3: !important; + | ^ error: Declaration --> $DIR/tests/fixture/value/custom-property/input.css:13:5 | -13 | --round-block: (1, 2, 3); +13 | --empty4:/**/ !important; | ^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/value/custom-property/input.css:13:5 | -13 | --round-block: (1, 2, 3); - | ^^^^^^^^^^^^^ +13 | --empty4:/**/ !important; + | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:13:20 + --> $DIR/tests/fixture/value/custom-property/input.css:13:18 | -13 | --round-block: (1, 2, 3); - | ^^^^^^^^^ +13 | --empty4:/**/ !important; + | ^ -error: RoundBracketBlock - --> $DIR/tests/fixture/value/custom-property/input.css:13:20 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:13:18 | -13 | --round-block: (1, 2, 3); - | ^^^^^^^^^ +13 | --empty4:/**/ !important; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:13:21 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:13:18 | -13 | --round-block: (1, 2, 3); - | ^^^^^^^ +13 | --empty4:/**/ !important; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:13:21 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:14:5 | -13 | --round-block: (1, 2, 3); - | ^ +14 | --empty5:/* 1 */ /* 2 */; + | ^^^^^^^^^^^^^^^^^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:13:21 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:14:5 | -13 | --round-block: (1, 2, 3); - | ^ +14 | --empty5:/* 1 */ /* 2 */; + | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:13:24 - | -13 | --round-block: (1, 2, 3); - | ^ - -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:13:24 + --> $DIR/tests/fixture/value/custom-property/input.css:14:21 | -13 | --round-block: (1, 2, 3); - | ^ +14 | --empty5:/* 1 */ /* 2 */; + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:13:27 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:14:21 | -13 | --round-block: (1, 2, 3); - | ^ +14 | --empty5:/* 1 */ /* 2 */; + | ^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:13:27 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:14:21 | -13 | --round-block: (1, 2, 3); - | ^ +14 | --empty5:/* 1 */ /* 2 */; + | ^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:15:5 + --> $DIR/tests/fixture/value/custom-property/input.css:16:5 | -15 | --bracket-block: {1, 2, 3}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +16 | --no-whitespace:ident; + | ^^^^^^^^^^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:15:5 + --> $DIR/tests/fixture/value/custom-property/input.css:16:5 | -15 | --bracket-block: {1, 2, 3}; +16 | --no-whitespace:ident; | ^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:15:22 - | -15 | --bracket-block: {1, 2, 3}; - | ^^^^^^^^^ - -error: BraceValue - --> $DIR/tests/fixture/value/custom-property/input.css:15:22 - | -15 | --bracket-block: {1, 2, 3}; - | ^^^^^^^^^ - -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:15:23 + --> $DIR/tests/fixture/value/custom-property/input.css:16:21 | -15 | --bracket-block: {1, 2, 3}; - | ^^^^^^^ +16 | --no-whitespace:ident; + | ^^^^^ error: Tokens - --> $DIR/tests/fixture/value/custom-property/input.css:15:23 + --> $DIR/tests/fixture/value/custom-property/input.css:16:21 | -15 | --bracket-block: {1, 2, 3}; - | ^^^^^^^ +16 | --no-whitespace:ident; + | ^^^^^ -error: Num { value: 1.0, raw: Atom('1' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:15:23 +error: Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:16:21 | -15 | --bracket-block: {1, 2, 3}; - | ^ +16 | --no-whitespace:ident; + | ^^^^^ -error: Comma - --> $DIR/tests/fixture/value/custom-property/input.css:15:24 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:17:5 | -15 | --bracket-block: {1, 2, 3}; - | ^ +17 | --number: 1; + | ^^^^^^^^^^ -error: WhiteSpace { value: Atom(' ' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:15:25 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:17:5 | -15 | --bracket-block: {1, 2, 3}; - | ^ +17 | --number: 1; + | ^^^^^^^^ -error: Num { value: 2.0, raw: Atom('2' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:15:26 +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:17:14 | -15 | --bracket-block: {1, 2, 3}; - | ^ +17 | --number: 1; + | ^^ -error: Comma - --> $DIR/tests/fixture/value/custom-property/input.css:15:27 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:17:14 | -15 | --bracket-block: {1, 2, 3}; - | ^ +17 | --number: 1; + | ^^ error: WhiteSpace { value: Atom(' ' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:15:28 + --> $DIR/tests/fixture/value/custom-property/input.css:17:14 | -15 | --bracket-block: {1, 2, 3}; - | ^ +17 | --number: 1; + | ^ -error: Num { value: 3.0, raw: Atom('3' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:15:29 +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:17:15 | -15 | --bracket-block: {1, 2, 3}; - | ^ +17 | --number: 1; + | ^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:16:5 + --> $DIR/tests/fixture/value/custom-property/input.css:18:5 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +18 | --unit: 100vw; + | ^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:16:5 + --> $DIR/tests/fixture/value/custom-property/input.css:18:5 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; +18 | --unit: 100vw; | ^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:13 - | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: SquareBracketBlock - --> $DIR/tests/fixture/value/custom-property/input.css:16:13 + --> $DIR/tests/fixture/value/custom-property/input.css:18:12 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +18 | --unit: 100vw; + | ^^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:14 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:18:12 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +18 | --unit: 100vw; + | ^^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:14 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:18:12 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +18 | --unit: 100vw; + | ^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:16:14 +error: Dimension { value: 100.0, raw_value: Atom('100' type=inline), unit: Atom('vw' type=inline), raw_unit: Atom('vw' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:18:13 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +18 | --unit: 100vw; + | ^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:17 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:19:5 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^ +19 | --color: #06c; + | ^^^^^^^^^ -error: Str - --> $DIR/tests/fixture/value/custom-property/input.css:16:17 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:19:5 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^ +19 | --color: #06c; + | ^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:22 + --> $DIR/tests/fixture/value/custom-property/input.css:19:13 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^^^ +19 | --color: #06c; + | ^^^^^ -error: BraceValue - --> $DIR/tests/fixture/value/custom-property/input.css:16:22 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:19:13 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^^^ +19 | --color: #06c; + | ^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:23 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:19:13 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^ +19 | --color: #06c; + | ^ -error: Tokens - --> $DIR/tests/fixture/value/custom-property/input.css:16:23 +error: Hash { is_id: false, value: Atom('06c' type=inline), raw: Atom('06c' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:19:14 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^^^^^^^^^^ +19 | --color: #06c; + | ^^^^ -error: Str { value: Atom('three' type=inline), raw: Atom('"three"' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:16:23 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:21:5 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^^^^^ +21 | --function: calc(1 + 1); + | ^^^^^^^^^^^^ -error: Colon - --> $DIR/tests/fixture/value/custom-property/input.css:16:30 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:21:5 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^^^^^^^^^^ -error: WhiteSpace { value: Atom(' ' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:16:31 +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:21:16 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^^^^^^^^^^^^ -error: LBrace - --> $DIR/tests/fixture/value/custom-property/input.css:16:32 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:21:16 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^^^^^^^^^^^^ -error: Str { value: Atom('a' type=inline), raw: Atom('"a"' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:16:33 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:21:16 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^ +21 | --function: calc(1 + 1); + | ^ -error: Colon - --> $DIR/tests/fixture/value/custom-property/input.css:16:36 +error: Function { value: Atom('calc' type=inline), raw: Atom('calc' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:21:17 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^^^^^ error: Num { value: 1.0, raw: Atom('1' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:16:37 + --> $DIR/tests/fixture/value/custom-property/input.css:21:22 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^ -error: RBrace - --> $DIR/tests/fixture/value/custom-property/input.css:16:38 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:21:23 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:42 +error: Delim { value: '+' } + --> $DIR/tests/fixture/value/custom-property/input.css:21:24 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^ +21 | --function: calc(1 + 1); + | ^ -error: SquareBracketBlock - --> $DIR/tests/fixture/value/custom-property/input.css:16:42 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:21:25 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^^^ +21 | --function: calc(1 + 1); + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:16:43 +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:21:26 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^ -error: Num - --> $DIR/tests/fixture/value/custom-property/input.css:16:43 +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:21:27 | -16 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; - | ^ +21 | --function: calc(1 + 1); + | ^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:17:5 + --> $DIR/tests/fixture/value/custom-property/input.css:22:5 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +22 | --variable: var(--unit); + | ^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:17:5 + --> $DIR/tests/fixture/value/custom-property/input.css:22:5 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^ +22 | --variable: var(--unit); + | ^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:17:19 + --> $DIR/tests/fixture/value/custom-property/input.css:22:16 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^ +22 | --variable: var(--unit); + | ^^^^^^^^^^^^ -error: FnValue - --> $DIR/tests/fixture/value/custom-property/input.css:17:19 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:22:16 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^ +22 | --variable: var(--unit); + | ^^^^^^^^^^^^ -error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:17:19 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:22:16 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^ +22 | --variable: var(--unit); + | ^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:17:28 +error: Function { value: Atom('var' type=static), raw: Atom('var' type=static) } + --> $DIR/tests/fixture/value/custom-property/input.css:22:17 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^ +22 | --variable: var(--unit); + | ^^^^ -error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:17:28 +error: Ident { value: Atom('--unit' type=inline), raw: Atom('--unit' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:22:21 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^ +22 | --variable: var(--unit); + | ^^^^^^ -error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:17:34 +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:22:27 + | +22 | --variable: var(--unit); + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:24:5 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^^^^^^^^ +24 | --string: 'single quoted string'; + | ^^^^^^^^^^ -error: BraceValue - --> $DIR/tests/fixture/value/custom-property/input.css:17:34 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:24:5 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^^^^^^^^ +24 | --string: 'single quoted string'; + | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:17:35 + --> $DIR/tests/fixture/value/custom-property/input.css:24:14 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^^^^^^ +24 | --string: 'single quoted string'; + | ^^^^^^^^^^^^^^^^^^^^^^^ error: Tokens - --> $DIR/tests/fixture/value/custom-property/input.css:17:35 + --> $DIR/tests/fixture/value/custom-property/input.css:24:14 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^^^^^^^^^^^^^ +24 | --string: 'single quoted string'; + | ^^^^^^^^^^^^^^^^^^^^^^^ error: WhiteSpace { value: Atom(' ' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:17:35 + --> $DIR/tests/fixture/value/custom-property/input.css:24:14 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^ +24 | --string: 'single quoted string'; + | ^ -error: Ident { value: Atom('console' type=inline), raw: Atom('console' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:17:36 +error: Str { value: Atom('single quoted string' type=dynamic), raw: Atom(''single quoted string'' type=dynamic) } + --> $DIR/tests/fixture/value/custom-property/input.css:24:15 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^^^^ +24 | --string: 'single quoted string'; + | ^^^^^^^^^^^^^^^^^^^^^^ -error: Delim { value: '.' } - --> $DIR/tests/fixture/value/custom-property/input.css:17:43 +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:25:5 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^ +25 | --string: "double quoted string"; + | ^^^^^^^^^^ -error: Function { value: Atom('log' type=inline), raw: Atom('log' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:17:44 +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:25:5 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^ +25 | --string: "double quoted string"; + | ^^^^^^^^ -error: Ident { value: Atom('rule' type=inline), raw: Atom('rule' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:17:48 +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:25:14 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^^^^ +25 | --string: "double quoted string"; + | ^^^^^^^^^^^^^^^^^^^^^^^ -error: RParen - --> $DIR/tests/fixture/value/custom-property/input.css:17:52 +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:25:14 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^ +25 | --string: "double quoted string"; + | ^^^^^^^^^^^^^^^^^^^^^^^ error: WhiteSpace { value: Atom(' ' type=inline) } - --> $DIR/tests/fixture/value/custom-property/input.css:17:53 + --> $DIR/tests/fixture/value/custom-property/input.css:25:14 | -17 | --javascript: function(rule) { console.log(rule) }; - | ^ +25 | --string: "double quoted string"; + | ^ + +error: Str { value: Atom('double quoted string' type=dynamic), raw: Atom('"double quoted string"' type=dynamic) } + --> $DIR/tests/fixture/value/custom-property/input.css:25:15 + | +25 | --string: "double quoted string"; + | ^^^^^^^^^^^^^^^^^^^^^^ error: Declaration - --> $DIR/tests/fixture/value/custom-property/input.css:19:5 + --> $DIR/tests/fixture/value/custom-property/input.css:27:5 | -19 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:19:5 + --> $DIR/tests/fixture/value/custom-property/input.css:27:5 | -19 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:19:12 + --> $DIR/tests/fixture/value/custom-property/input.css:27:20 | -19 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:19:12 + --> $DIR/tests/fixture/value/custom-property/input.css:27:20 | -19 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:19:12 +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:27:20 | -19 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:20:5 +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:27:21 | -20 | --CDC: -->; - | ^^^^^^^^^^ +27 | --square-block: [1, 2, 3]; + | ^ + +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:27:22 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:27:23 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:27:24 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: Num { value: 2.0, raw: Atom('2' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:27:25 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:27:26 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:27:27 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: Num { value: 3.0, raw: Atom('3' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:27:28 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:27:29 + | +27 | --square-block: [1, 2, 3]; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:28:5 + | +28 | --square-block1: []; + | ^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:28:5 + | +28 | --square-block1: []; + | ^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:28:21 + | +28 | --square-block1: []; + | ^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:28:21 + | +28 | --square-block1: []; + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:28:21 + | +28 | --square-block1: []; + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:28:22 + | +28 | --square-block1: []; + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:28:23 + | +28 | --square-block1: []; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:29:5 + | +29 | --square-block2:[]; + | ^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:29:5 + | +29 | --square-block2:[]; + | ^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:29:21 + | +29 | --square-block2:[]; + | ^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:29:21 + | +29 | --square-block2:[]; + | ^^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:29:21 + | +29 | --square-block2:[]; + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:29:22 + | +29 | --square-block2:[]; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:30:5 + | +30 | --round-block: (1, 2, 3); + | ^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:30:5 + | +30 | --round-block: (1, 2, 3); + | ^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:30:19 + | +30 | --round-block: (1, 2, 3); + | ^^^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:30:19 + | +30 | --round-block: (1, 2, 3); + | ^^^^^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:30:19 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:30:20 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:30:21 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:30:22 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:30:23 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: Num { value: 2.0, raw: Atom('2' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:30:24 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:30:25 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:30:26 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: Num { value: 3.0, raw: Atom('3' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:30:27 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:30:28 + | +30 | --round-block: (1, 2, 3); + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:31:5 + | +31 | --round-block1: (); + | ^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:31:5 + | +31 | --round-block1: (); + | ^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:31:20 + | +31 | --round-block1: (); + | ^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:31:20 + | +31 | --round-block1: (); + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:31:20 + | +31 | --round-block1: (); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:31:21 + | +31 | --round-block1: (); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:31:22 + | +31 | --round-block1: (); + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:32:5 + | +32 | --round-block2:(); + | ^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:32:5 + | +32 | --round-block2:(); + | ^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:32:20 + | +32 | --round-block2:(); + | ^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:32:20 + | +32 | --round-block2:(); + | ^^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:32:20 + | +32 | --round-block2:(); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:32:21 + | +32 | --round-block2:(); + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:33:5 + | +33 | --bracket-block: {1, 2, 3}; + | ^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:33:5 + | +33 | --bracket-block: {1, 2, 3}; + | ^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:33:21 + | +33 | --bracket-block: {1, 2, 3}; + | ^^^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:33:21 + | +33 | --bracket-block: {1, 2, 3}; + | ^^^^^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:33:21 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:33:22 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:33:23 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:33:24 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:33:25 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: Num { value: 2.0, raw: Atom('2' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:33:26 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:33:27 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:33:28 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: Num { value: 3.0, raw: Atom('3' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:33:29 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:33:30 + | +33 | --bracket-block: {1, 2, 3}; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:34:5 + | +34 | --bracket-block1: {}; + | ^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:34:5 + | +34 | --bracket-block1: {}; + | ^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:34:22 + | +34 | --bracket-block1: {}; + | ^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:34:22 + | +34 | --bracket-block1: {}; + | ^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:34:22 + | +34 | --bracket-block1: {}; + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:34:23 + | +34 | --bracket-block1: {}; + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:34:24 + | +34 | --bracket-block1: {}; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:35:5 + | +35 | --bracket-block2:{}; + | ^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:35:5 + | +35 | --bracket-block2:{}; + | ^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:35:22 + | +35 | --bracket-block2:{}; + | ^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:35:22 + | +35 | --bracket-block2:{}; + | ^^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:35:22 + | +35 | --bracket-block2:{}; + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:35:23 + | +35 | --bracket-block2:{}; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:38:5 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:38:5 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:38:12 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:38:12 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:12 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:38:13 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:14 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:38:15 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:16 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Str { value: Atom('2' type=inline), raw: Atom('"2"' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:17 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:38:20 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:21 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:38:22 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Str { value: Atom('three' type=inline), raw: Atom('"three"' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:23 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^^^^^ + +error: Colon + --> $DIR/tests/fixture/value/custom-property/input.css:38:30 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:31 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:38:32 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Str { value: Atom('a' type=inline), raw: Atom('"a"' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:33 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^^^ + +error: Colon + --> $DIR/tests/fixture/value/custom-property/input.css:38:36 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:37 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:38:38 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:38:39 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Comma + --> $DIR/tests/fixture/value/custom-property/input.css:38:40 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:41 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:38:42 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Num { value: 4.0, raw: Atom('4' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:38:43 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:38:44 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:38:45 + | +38 | --JSON: [1, "2", {"three": {"a":1}}, [4]]; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:39:5 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:39:5 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:39:18 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:39:18 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:18 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: Function { value: Atom('function' type=static), raw: Atom('function' type=static) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:19 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^^^ + +error: Ident { value: Atom('rule' type=inline), raw: Atom('rule' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:28 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:39:32 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:33 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:39:34 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:35 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: Ident { value: Atom('console' type=inline), raw: Atom('console' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:36 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^^^^ + +error: Delim { value: '.' } + --> $DIR/tests/fixture/value/custom-property/input.css:39:43 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: Function { value: Atom('log' type=inline), raw: Atom('log' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:44 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^ + +error: Ident { value: Atom('rule' type=inline), raw: Atom('rule' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:48 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^^^^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:39:52 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:39:53 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:39:54 + | +39 | --javascript: function(rule) { console.log(rule) }; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:41:5 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:5 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:11 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:11 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:11 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:41:12 + | +41 | --CDO: $DIR/tests/fixture/value/custom-property/input.css:42:5 + | +42 | --CDC: -->; + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:42:5 + | +42 | --CDC: -->; + | ^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:42:11 + | +42 | --CDC: -->; + | ^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:42:11 + | +42 | --CDC: -->; + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:42:11 + | +42 | --CDC: -->; + | ^ + +error: CDC + --> $DIR/tests/fixture/value/custom-property/input.css:42:12 + | +42 | --CDC: -->; + | ^^^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:44:5 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:44:5 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^^^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:44:24 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:44:24 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:24 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:25 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:26 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:27 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:28 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:29 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:30 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:31 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:32 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:33 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:34 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:35 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:36 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:37 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:38 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:39 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:40 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:41 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:42 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:43 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:44 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:45 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:46 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:47 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:44:48 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:49 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:50 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: LBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:51 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RBracket + --> $DIR/tests/fixture/value/custom-property/input.css:44:52 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:44:53 + | +44 | --complex-balanced:{[({()})()()[({})]]}[{()}]([]); + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:45:5 + | +45 | --fake-important:{!important}; + | ^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:45:5 + | +45 | --fake-important:{!important}; + | ^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:45:22 + | +45 | --fake-important:{!important}; + | ^^^^^^^^^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:45:22 + | +45 | --fake-important:{!important}; + | ^^^^^^^^^^^^ + +error: LBrace + --> $DIR/tests/fixture/value/custom-property/input.css:45:22 + | +45 | --fake-important:{!important}; + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/value/custom-property/input.css:45:23 + | +45 | --fake-important:{!important}; + | ^ + +error: Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + --> $DIR/tests/fixture/value/custom-property/input.css:45:24 + | +45 | --fake-important:{!important}; + | ^^^^^^^^^ + +error: RBrace + --> $DIR/tests/fixture/value/custom-property/input.css:45:33 + | +45 | --fake-important:{!important}; + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:46:5 + | +46 | --semicolon-not-top-level: (;); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:46:5 + | +46 | --semicolon-not-top-level: (;); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:46:31 + | +46 | --semicolon-not-top-level: (;); + | ^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:46:31 + | +46 | --semicolon-not-top-level: (;); + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:46:31 + | +46 | --semicolon-not-top-level: (;); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:46:32 + | +46 | --semicolon-not-top-level: (;); + | ^ + +error: Semi + --> $DIR/tests/fixture/value/custom-property/input.css:46:33 + | +46 | --semicolon-not-top-level: (;); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:46:34 + | +46 | --semicolon-not-top-level: (;); + | ^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:47:5 + | +47 | --delim-not-top-level: (!); + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:47:5 + | +47 | --delim-not-top-level: (!); + | ^^^^^^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:47:27 + | +47 | --delim-not-top-level: (!); + | ^^^^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:47:27 + | +47 | --delim-not-top-level: (!); + | ^^^^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:47:27 + | +47 | --delim-not-top-level: (!); + | ^ + +error: LParen + --> $DIR/tests/fixture/value/custom-property/input.css:47:28 + | +47 | --delim-not-top-level: (!); + | ^ + +error: Delim { value: '!' } + --> $DIR/tests/fixture/value/custom-property/input.css:47:29 + | +47 | --delim-not-top-level: (!); + | ^ + +error: RParen + --> $DIR/tests/fixture/value/custom-property/input.css:47:30 + | +47 | --delim-not-top-level: (!); + | ^ + +error: Rule + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/value/custom-property/input.css:50:1 + | +50 | :root{--a:1} + | ^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:50:2 + | +50 | :root{--a:1} + | ^^^^ + +error: Block + --> $DIR/tests/fixture/value/custom-property/input.css:50:6 + | +50 | :root{--a:1} + | ^^^^^^^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:50:7 + | +50 | :root{--a:1} + | ^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:50:7 + | +50 | :root{--a:1} + | ^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:50:11 + | +50 | :root{--a:1} + | ^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:50:11 + | +50 | :root{--a:1} + | ^ + +error: Num { value: 1.0, raw: Atom('1' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:50:11 + | +50 | :root{--a:1} + | ^ + +error: Rule + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^^^^^^^^^^^ + +error: QualifiedRule + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^^^^^^^^^^^ + +error: SelectorList + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/value/custom-property/input.css:51:1 + | +51 | :root {--foo: } + | ^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:51:2 + | +51 | :root {--foo: } + | ^^^^ + +error: Block + --> $DIR/tests/fixture/value/custom-property/input.css:51:7 + | +51 | :root {--foo: } + | ^^^^^^^^^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:51:8 + | +51 | :root {--foo: } + | ^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:51:8 + | +51 | :root {--foo: } + | ^^^^^ + +error: Value + --> $DIR/tests/fixture/value/custom-property/input.css:51:14 + | +51 | :root {--foo: } + | ^ + +error: Tokens + --> $DIR/tests/fixture/value/custom-property/input.css:51:14 + | +51 | :root {--foo: } + | ^ + +error: WhiteSpace { value: Atom(' ' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:51:14 + | +51 | :root {--foo: } + | ^ + +error: Rule + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | / :root { +53 | | --foo: +54 | | } + | |_^ + +error: QualifiedRule + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | / :root { +53 | | --foo: +54 | | } + | |_^ + +error: SelectorList + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | :root { + | ^^^^^ + +error: ComplexSelector + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | :root { + | ^^^^^ + +error: CompoundSelector + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | :root { + | ^^^^^ + +error: SubclassSelector + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | :root { + | ^^^^^ + +error: PseudoClassSelector + --> $DIR/tests/fixture/value/custom-property/input.css:52:1 + | +52 | :root { + | ^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/custom-property/input.css:52:2 + | +52 | :root { + | ^^^^ + +error: Block + --> $DIR/tests/fixture/value/custom-property/input.css:52:7 + | +52 | :root { + | _______^ +53 | | --foo: +54 | | } + | |_^ + +error: Declaration + --> $DIR/tests/fixture/value/custom-property/input.css:53:5 + | +53 | / --foo: +54 | | } + | |_ error: Ident - --> $DIR/tests/fixture/value/custom-property/input.css:20:5 + --> $DIR/tests/fixture/value/custom-property/input.css:53:5 | -20 | --CDC: -->; +53 | --foo: | ^^^^^ error: Value - --> $DIR/tests/fixture/value/custom-property/input.css:20:12 + --> $DIR/tests/fixture/value/custom-property/input.css:53:11 | -20 | --CDC: -->; - | ^^^ +53 | --foo: + | ___________^ +54 | | } + | |_ error: Tokens - --> $DIR/tests/fixture/value/custom-property/input.css:20:12 + --> $DIR/tests/fixture/value/custom-property/input.css:53:11 | -20 | --CDC: -->; - | ^^^ +53 | --foo: + | ___________^ +54 | | } + | |_ -error: CDC - --> $DIR/tests/fixture/value/custom-property/input.css:20:12 +error: WhiteSpace { value: Atom(' +' type=inline) } + --> $DIR/tests/fixture/value/custom-property/input.css:53:11 | -20 | --CDC: -->; - | ^^^ +53 | --foo: + | ___________^ +54 | | } + | |_ diff --git a/crates/swc_css_parser/tests/fixture/value/square-brackets/input.css b/crates/swc_css_parser/tests/fixture/value/square-brackets/input.css index 54c77a916bdd..bbe7ab3fd32f 100644 --- a/crates/swc_css_parser/tests/fixture/value/square-brackets/input.css +++ b/crates/swc_css_parser/tests/fixture/value/square-brackets/input.css @@ -2,6 +2,7 @@ div { prop: []; prop: [ ]; prop: [row1-start]; + prop: [ row1-start-with-spaces-around ]; prop: [red #fff 12px]; prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; } diff --git a/crates/swc_css_parser/tests/fixture/value/square-brackets/output.json b/crates/swc_css_parser/tests/fixture/value/square-brackets/output.json index ce2d4e1a4e06..fd3ebdd058bc 100644 --- a/crates/swc_css_parser/tests/fixture/value/square-brackets/output.json +++ b/crates/swc_css_parser/tests/fixture/value/square-brackets/output.json @@ -2,7 +2,7 @@ "type": "Stylesheet", "span": { "start": 0, - "end": 157, + "end": 207, "ctxt": 0 }, "rules": [ @@ -10,7 +10,7 @@ "type": "QualifiedRule", "span": { "start": 0, - "end": 156, + "end": 206, "ctxt": 0 }, "prelude": { @@ -66,7 +66,7 @@ "type": "Block", "span": { "start": 4, - "end": 156, + "end": 206, "ctxt": 0 }, "items": [ @@ -175,7 +175,7 @@ "type": "Declaration", "span": { "start": 66, - "end": 88, + "end": 110, "ctxt": 0 }, "property": { @@ -193,15 +193,56 @@ "type": "SquareBracketBlock", "span": { "start": 73, - "end": 88, + "end": 110, "ctxt": 0 }, "children": [ { "type": "Identifier", "span": { - "start": 74, - "end": 77, + "start": 77, + "end": 106, + "ctxt": 0 + }, + "value": "row1-start-with-spaces-around", + "raw": "row1-start-with-spaces-around" + } + ] + } + ], + "important": null + }, + { + "type": "Declaration", + "span": { + "start": 116, + "end": 138, + "ctxt": 0 + }, + "property": { + "type": "Identifier", + "span": { + "start": 116, + "end": 120, + "ctxt": 0 + }, + "value": "prop", + "raw": "prop" + }, + "value": [ + { + "type": "SquareBracketBlock", + "span": { + "start": 123, + "end": 138, + "ctxt": 0 + }, + "children": [ + { + "type": "Identifier", + "span": { + "start": 124, + "end": 127, "ctxt": 0 }, "value": "red", @@ -210,8 +251,8 @@ { "type": "HashValue", "span": { - "start": 78, - "end": 82, + "start": 128, + "end": 132, "ctxt": 0 }, "value": "fff", @@ -220,15 +261,15 @@ { "type": "UnitValue", "span": { - "start": 83, - "end": 87, + "start": 133, + "end": 137, "ctxt": 0 }, "value": { "type": "Number", "span": { - "start": 83, - "end": 85, + "start": 133, + "end": 135, "ctxt": 0 }, "value": 12.0, @@ -236,8 +277,8 @@ }, "unit": { "span": { - "start": 85, - "end": 87, + "start": 135, + "end": 137, "ctxt": 0 }, "value": "px", @@ -252,15 +293,15 @@ { "type": "Declaration", "span": { - "start": 94, - "end": 153, + "start": 144, + "end": 203, "ctxt": 0 }, "property": { "type": "Identifier", "span": { - "start": 94, - "end": 98, + "start": 144, + "end": 148, "ctxt": 0 }, "value": "prop", @@ -270,16 +311,16 @@ { "type": "SquareBracketBlock", "span": { - "start": 100, - "end": 112, + "start": 150, + "end": 162, "ctxt": 0 }, "children": [ { "type": "Identifier", "span": { - "start": 101, - "end": 111, + "start": 151, + "end": 161, "ctxt": 0 }, "value": "row1-start", @@ -290,15 +331,15 @@ { "type": "PercentValue", "span": { - "start": 113, - "end": 116, + "start": 163, + "end": 166, "ctxt": 0 }, "value": { "type": "Number", "span": { - "start": 113, - "end": 115, + "start": 163, + "end": 165, "ctxt": 0 }, "value": 25.0, @@ -308,16 +349,16 @@ { "type": "SquareBracketBlock", "span": { - "start": 117, - "end": 138, + "start": 167, + "end": 188, "ctxt": 0 }, "children": [ { "type": "Identifier", "span": { - "start": 118, - "end": 126, + "start": 168, + "end": 176, "ctxt": 0 }, "value": "row1-end", @@ -326,8 +367,8 @@ { "type": "Identifier", "span": { - "start": 127, - "end": 137, + "start": 177, + "end": 187, "ctxt": 0 }, "value": "row2-start", @@ -338,15 +379,15 @@ { "type": "PercentValue", "span": { - "start": 139, - "end": 142, + "start": 189, + "end": 192, "ctxt": 0 }, "value": { "type": "Number", "span": { - "start": 139, - "end": 141, + "start": 189, + "end": 191, "ctxt": 0 }, "value": 25.0, @@ -356,16 +397,16 @@ { "type": "SquareBracketBlock", "span": { - "start": 143, - "end": 153, + "start": 193, + "end": 203, "ctxt": 0 }, "children": [ { "type": "Identifier", "span": { - "start": 144, - "end": 152, + "start": 194, + "end": 202, "ctxt": 0 }, "value": "row2-end", diff --git a/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug b/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug index 28718c5736b0..510987664fa0 100644 --- a/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug +++ b/crates/swc_css_parser/tests/fixture/value/square-brackets/span.rust-debug @@ -5,9 +5,9 @@ error: Stylesheet 2 | | prop: []; 3 | | prop: [ ]; 4 | | prop: [row1-start]; -5 | | prop: [red #fff 12px]; -6 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; -7 | | } +... | +7 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +8 | | } | |__^ error: Rule @@ -17,9 +17,9 @@ error: Rule 2 | | prop: []; 3 | | prop: [ ]; 4 | | prop: [row1-start]; -5 | | prop: [red #fff 12px]; -6 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; -7 | | } +... | +7 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +8 | | } | |_^ error: QualifiedRule @@ -29,9 +29,9 @@ error: QualifiedRule 2 | | prop: []; 3 | | prop: [ ]; 4 | | prop: [row1-start]; -5 | | prop: [red #fff 12px]; -6 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; -7 | | } +... | +7 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +8 | | } | |_^ error: SelectorList @@ -72,9 +72,9 @@ error: Block 2 | | prop: []; 3 | | prop: [ ]; 4 | | prop: [row1-start]; -5 | | prop: [red #fff 12px]; -6 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; -7 | | } +... | +7 | | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +8 | | } | |_^ error: Declaration @@ -164,204 +164,240 @@ error: Ident error: Declaration --> $DIR/tests/fixture/value/square-brackets/input.css:5:5 | -5 | prop: [red #fff 12px]; - | ^^^^^^^^^^^^^^^^^^^^^^ +5 | prop: [ row1-start-with-spaces-around ]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident --> $DIR/tests/fixture/value/square-brackets/input.css:5:5 | -5 | prop: [red #fff 12px]; +5 | prop: [ row1-start-with-spaces-around ]; | ^^^^ error: Value --> $DIR/tests/fixture/value/square-brackets/input.css:5:12 | -5 | prop: [red #fff 12px]; - | ^^^^^^^^^^^^^^^ +5 | prop: [ row1-start-with-spaces-around ]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: SquareBracketBlock --> $DIR/tests/fixture/value/square-brackets/input.css:5:12 | -5 | prop: [red #fff 12px]; +5 | prop: [ row1-start-with-spaces-around ]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Value + --> $DIR/tests/fixture/value/square-brackets/input.css:5:16 + | +5 | prop: [ row1-start-with-spaces-around ]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/square-brackets/input.css:5:16 + | +5 | prop: [ row1-start-with-spaces-around ]; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: Declaration + --> $DIR/tests/fixture/value/square-brackets/input.css:6:5 + | +6 | prop: [red #fff 12px]; + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: Ident + --> $DIR/tests/fixture/value/square-brackets/input.css:6:5 + | +6 | prop: [red #fff 12px]; + | ^^^^ + +error: Value + --> $DIR/tests/fixture/value/square-brackets/input.css:6:12 + | +6 | prop: [red #fff 12px]; + | ^^^^^^^^^^^^^^^ + +error: SquareBracketBlock + --> $DIR/tests/fixture/value/square-brackets/input.css:6:12 + | +6 | prop: [red #fff 12px]; | ^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:5:13 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:13 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^^ error: Ident - --> $DIR/tests/fixture/value/square-brackets/input.css:5:13 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:13 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:5:17 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:17 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^^^ error: HashValue - --> $DIR/tests/fixture/value/square-brackets/input.css:5:17 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:17 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:5:22 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:22 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^^^ error: UnitValue - --> $DIR/tests/fixture/value/square-brackets/input.css:5:22 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:22 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^^^ error: Num - --> $DIR/tests/fixture/value/square-brackets/input.css:5:22 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:22 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^ error: Unit - --> $DIR/tests/fixture/value/square-brackets/input.css:5:24 + --> $DIR/tests/fixture/value/square-brackets/input.css:6:24 | -5 | prop: [red #fff 12px]; +6 | prop: [red #fff 12px]; | ^^ error: Declaration - --> $DIR/tests/fixture/value/square-brackets/input.css:6:5 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:5 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/square-brackets/input.css:6:5 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:5 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:11 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:11 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^^^ error: SquareBracketBlock - --> $DIR/tests/fixture/value/square-brackets/input.css:6:11 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:11 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:12 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:12 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/square-brackets/input.css:6:12 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:12 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:24 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:24 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^ error: PercentValue - --> $DIR/tests/fixture/value/square-brackets/input.css:6:24 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:24 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^ error: Num - --> $DIR/tests/fixture/value/square-brackets/input.css:6:24 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:24 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:28 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:28 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^^^^^^^^^^^^ error: SquareBracketBlock - --> $DIR/tests/fixture/value/square-brackets/input.css:6:28 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:28 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^^^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:29 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:29 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/square-brackets/input.css:6:29 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:29 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:38 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:38 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/square-brackets/input.css:6:38 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:38 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:50 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:50 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^ error: PercentValue - --> $DIR/tests/fixture/value/square-brackets/input.css:6:50 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:50 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^ error: Num - --> $DIR/tests/fixture/value/square-brackets/input.css:6:50 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:50 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:54 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:54 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^ error: SquareBracketBlock - --> $DIR/tests/fixture/value/square-brackets/input.css:6:54 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:54 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^^^ error: Value - --> $DIR/tests/fixture/value/square-brackets/input.css:6:55 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:55 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^ error: Ident - --> $DIR/tests/fixture/value/square-brackets/input.css:6:55 + --> $DIR/tests/fixture/value/square-brackets/input.css:7:55 | -6 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; +7 | prop: [row1-start] 25% [row1-end row2-start] 25% [row2-end]; | ^^^^^^^^