diff --git a/crates/swc_css_ast/src/at_rule.rs b/crates/swc_css_ast/src/at_rule.rs index 8621dfd028cf..b55f0ee27b64 100644 --- a/crates/swc_css_ast/src/at_rule.rs +++ b/crates/swc_css_ast/src/at_rule.rs @@ -1,6 +1,6 @@ use is_macro::Is; use string_enum::StringEnum; -use swc_atoms::JsWord; +use swc_atoms::{Atom, JsWord}; use swc_common::{ast_node, EqIgnoreSpan, Span}; use crate::{ @@ -809,8 +809,7 @@ pub struct ExtensionName { pub span: Span, #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] pub value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - pub raw: Option, + pub raw: Option, } impl EqIgnoreSpan for ExtensionName { diff --git a/crates/swc_css_ast/src/selector.rs b/crates/swc_css_ast/src/selector.rs index f86b5ece3cd5..38f55815532e 100644 --- a/crates/swc_css_ast/src/selector.rs +++ b/crates/swc_css_ast/src/selector.rs @@ -1,6 +1,6 @@ use is_macro::Is; use string_enum::StringEnum; -use swc_atoms::JsWord; +use swc_atoms::{Atom, JsWord}; use swc_common::{ast_node, util::take::Take, EqIgnoreSpan, Span}; use crate::{Delimiter, Ident, ListOfComponentValues, Str, TokenAndSpan}; @@ -369,11 +369,9 @@ pub enum AnPlusB { pub struct AnPlusBNotation { pub span: Span, pub a: Option, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - pub a_raw: Option, + pub a_raw: Option, pub b: Option, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - pub b_raw: Option, + pub b_raw: Option, } #[ast_node("PseudoElementSelector")] @@ -403,8 +401,7 @@ pub struct CustomHighlightName { pub span: Span, #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] pub value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - pub raw: Option, + pub raw: Option, } impl EqIgnoreSpan for CustomHighlightName { diff --git a/crates/swc_css_ast/src/token.rs b/crates/swc_css_ast/src/token.rs index 0471126b6be7..fad76ed6f68f 100644 --- a/crates/swc_css_ast/src/token.rs +++ b/crates/swc_css_ast/src/token.rs @@ -5,7 +5,7 @@ use std::{ use is_macro::Is; use serde::{Deserialize, Serialize}; -use swc_atoms::JsWord; +use swc_atoms::{Atom, JsWord}; use swc_common::{ast_node, EqIgnoreSpan, Span}; #[ast_node("PreservedToken")] @@ -52,23 +52,20 @@ pub enum Token { Ident { #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, }, Function { #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, }, /// `@` AtKeyword { #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, }, /// `#` @@ -76,41 +73,34 @@ pub enum Token { is_id: bool, #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, }, String { #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, }, BadString { - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_value: JsWord, + raw_value: Atom, }, /// `url(value)` Url { #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] name: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_name: JsWord, + raw_name: Atom, #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] value: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_value: JsWord, + raw_value: Atom, }, BadUrl { #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] name: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_name: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_value: JsWord, + raw_name: Atom, + raw_value: Atom, }, Delim { @@ -119,34 +109,29 @@ pub enum Token { Number { value: f64, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, #[serde(rename = "type")] type_flag: NumberType, }, Percentage { value: f64, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw: JsWord, + raw: Atom, }, Dimension { value: f64, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_value: JsWord, + raw_value: Atom, #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] unit: JsWord, - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - raw_unit: JsWord, + raw_unit: Atom, #[serde(rename = "type")] type_flag: NumberType, }, /// One or more whitespace. WhiteSpace { - #[cfg_attr(feature = "rkyv", with(swc_atoms::EncodeJsWord))] - value: JsWord, + value: Atom, }, /// ` {} `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/fixture/at-rule/unknown/input.css:37:1] 37 | ,-> @unknown { 38 | `-> --> {} @@ -4635,7 +4634,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/fixture/at-rule/unknown/input.css:38:5] 38 | --> {} : ^ @@ -4665,8 +4664,7 @@ 39 | `-> {} 39 | `-> : ^^^ @@ -81,7 +81,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:1:1] 1 | : ^ @@ -106,9 +106,7 @@ 3 | div { `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:1:1] 1 | ,-> 2 | `-> @@ -121,7 +119,7 @@ : ^^^ `---- - x Ident { value: Atom('div' type=static), raw: Atom('div' type=static) } + x Ident { value: Atom('div' type=static), raw: "div" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:3:1] 3 | div { : ^^^ @@ -133,7 +131,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:3:1] 3 | div { : ^ @@ -238,9 +236,7 @@ 7 | test `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:5:1] 5 | ,-> `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:7:1] 7 | ,-> test 8 | `-> @@ -294,8 +288,7 @@ 10 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:9:1] 9 | --> : ^ @@ -475,9 +468,7 @@ 16 | test `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:14:1] 14 | ,-> `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:16:1] 16 | ,-> test 17 | `-> @@ -531,9 +520,7 @@ 20 | `-> color: blue; `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n " } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:18:1] 18 | ,-> --> 19 | | @@ -546,7 +533,7 @@ : ^^^^^ `---- - x Ident { value: Atom('color' type=static), raw: Atom('color' type=static) } + x Ident { value: Atom('color' type=static), raw: "color" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:20:5] 20 | color: blue; : ^^^^^ @@ -570,7 +557,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:20:5] 20 | color: blue; : ^ @@ -582,7 +569,7 @@ : ^^^^ `---- - x Ident { value: Atom('blue' type=inline), raw: Atom('blue' type=inline) } + x Ident { value: Atom('blue' type=inline), raw: "blue" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:20:5] 20 | color: blue; : ^^^^ @@ -769,9 +756,7 @@ 27 | test `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:25:1] 25 | ,-> ; `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/cdo-and-cdc/input.css:27:1] 27 | ,-> test 28 | `-> diff --git a/crates/swc_css_parser/tests/recovery/comments/bad-comment-1/span.rust-debug b/crates/swc_css_parser/tests/recovery/comments/bad-comment-1/span.rust-debug index adc9711ad564..052ad78b351c 100644 --- a/crates/swc_css_parser/tests/recovery/comments/bad-comment-1/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/comments/bad-comment-1/span.rust-debug @@ -41,7 +41,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/comments/bad-comment-1/input.css:1:1] 1 | // comment : ^ @@ -53,7 +53,7 @@ : ^^^^^^^ `---- - x Ident { value: Atom('comment' type=inline), raw: Atom('comment' type=inline) } + x Ident { value: Atom('comment' type=inline), raw: "comment" } ,-[$DIR/tests/recovery/comments/bad-comment-1/input.css:1:1] 1 | // comment : ^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/comments/declaration/span.rust-debug b/crates/swc_css_parser/tests/recovery/comments/declaration/span.rust-debug index ca23a796e809..f7471e2d1477 100644 --- a/crates/swc_css_parser/tests/recovery/comments/declaration/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/comments/declaration/span.rust-debug @@ -136,7 +136,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/comments/declaration/input.css:2:5] 2 | prop: url("test") /* comment */ /* comment */ : ^^^^^^ @@ -148,7 +148,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/comments/declaration/input.css:2:5] 2 | prop: url("test") /* comment */ /* comment */ : ^ @@ -160,7 +160,7 @@ : ^^^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/comments/declaration/input.css:2:5] 2 | prop: url("test") /* comment */ /* comment */ : ^^^ @@ -172,8 +172,7 @@ 3 | `-> /* comment */: `---- - x WhiteSpace { value: Atom(' - | ' type=dynamic) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/comments/declaration/input.css:2:5] 2 | ,-> prop: url("test") /* comment */ /* comment */ 3 | `-> /* comment */: diff --git a/crates/swc_css_parser/tests/recovery/declaration/basic/span.rust-debug b/crates/swc_css_parser/tests/recovery/declaration/basic/span.rust-debug index 06582e788aa1..599fcc135d4a 100644 --- a/crates/swc_css_parser/tests/recovery/declaration/basic/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/declaration/basic/span.rust-debug @@ -407,7 +407,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/declaration/basic/input.css:12:5] 12 | test; : ^^^^ diff --git a/crates/swc_css_parser/tests/recovery/declaration/important/span.rust-debug b/crates/swc_css_parser/tests/recovery/declaration/important/span.rust-debug index 35957f5714b4..7623305120f1 100644 --- a/crates/swc_css_parser/tests/recovery/declaration/important/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/declaration/important/span.rust-debug @@ -125,7 +125,7 @@ : ^^^^^ `---- - x Ident { value: Atom('white' type=inline), raw: Atom('white' type=inline) } + x Ident { value: Atom('white' type=inline), raw: "white" } ,-[$DIR/tests/recovery/declaration/important/input.css:2:5] 2 | color: white !!important; : ^^^^^ @@ -137,7 +137,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:2:5] 2 | color: white !!important; : ^ @@ -254,7 +254,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^^^ @@ -266,7 +266,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^ @@ -278,7 +278,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^^^ @@ -290,7 +290,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^ @@ -302,7 +302,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^^^ @@ -314,7 +314,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^ @@ -338,7 +338,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + x Ident { value: Atom('important' type=static), raw: "important" } ,-[$DIR/tests/recovery/declaration/important/input.css:6:5] 6 | color: red red red !important !important; : ^^^^^^^^^ @@ -455,7 +455,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^^^ @@ -467,7 +467,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^ @@ -479,7 +479,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^^^ @@ -491,7 +491,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^ @@ -503,7 +503,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^^^ @@ -515,7 +515,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^ @@ -539,7 +539,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + x Ident { value: Atom('important' type=static), raw: "important" } ,-[$DIR/tests/recovery/declaration/important/input.css:10:5] 10 | color: red red red !important!important ; : ^^^^^^^^^ @@ -656,7 +656,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^^^ @@ -668,7 +668,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^ @@ -680,7 +680,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^^^ @@ -692,7 +692,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^ @@ -704,7 +704,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^^^ @@ -716,7 +716,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^ @@ -728,7 +728,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^ @@ -752,7 +752,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + x Ident { value: Atom('important' type=static), raw: "important" } ,-[$DIR/tests/recovery/declaration/important/input.css:14:5] 14 | color: red red red /* test*/ !important /*test*/ !important /*test*/ ; : ^^^^^^^^^ @@ -869,7 +869,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^^^ @@ -881,7 +881,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^ @@ -893,7 +893,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^^^ @@ -905,7 +905,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^ @@ -917,7 +917,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^^^ @@ -929,7 +929,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^ @@ -953,7 +953,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + x Ident { value: Atom('important' type=static), raw: "important" } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^^^^^^^^^ @@ -965,7 +965,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^ @@ -989,7 +989,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + x Ident { value: Atom('important' type=static), raw: "important" } ,-[$DIR/tests/recovery/declaration/important/input.css:18:5] 18 | color: red red red !important !important!important; : ^^^^^^^^^ @@ -1106,7 +1106,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^^^ @@ -1118,7 +1118,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^ @@ -1130,7 +1130,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^^^ @@ -1142,7 +1142,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^ @@ -1154,7 +1154,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^^^ @@ -1166,7 +1166,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^ @@ -1178,7 +1178,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^ @@ -1202,7 +1202,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^ @@ -1214,7 +1214,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^ @@ -1226,7 +1226,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('important' type=static), raw: Atom('important' type=static) } + x Ident { value: Atom('important' type=static), raw: "important" } ,-[$DIR/tests/recovery/declaration/important/input.css:22:5] 22 | color: red red red /* test */ ! /*test */ important /* test */ ! /* test */ important /* test */; : ^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/delim-token/at-sign/span.rust-debug b/crates/swc_css_parser/tests/recovery/delim-token/at-sign/span.rust-debug index 15a99a06331c..c6830e773dd4 100644 --- a/crates/swc_css_parser/tests/recovery/delim-token/at-sign/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/delim-token/at-sign/span.rust-debug @@ -123,7 +123,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/at-sign/input.css:2:5] 2 | color: @ red; : ^ @@ -135,7 +135,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/delim-token/at-sign/input.css:2:5] 2 | color: @ red; : ^^^ diff --git a/crates/swc_css_parser/tests/recovery/delim-token/minus/span.rust-debug b/crates/swc_css_parser/tests/recovery/delim-token/minus/span.rust-debug index f4dc104765af..f0fa36dd619d 100644 --- a/crates/swc_css_parser/tests/recovery/delim-token/minus/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/delim-token/minus/span.rust-debug @@ -161,7 +161,7 @@ : ^ `---- - x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer } + x Number { value: 1.0, raw: "1", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/minus/input.css:3:5] 3 | prop1: 1 - 2; : ^ @@ -173,7 +173,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/minus/input.css:3:5] 3 | prop1: 1 - 2; : ^ @@ -197,7 +197,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/minus/input.css:3:5] 3 | prop1: 1 - 2; : ^ @@ -209,7 +209,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/minus/input.css:3:5] 3 | prop1: 1 - 2; : ^ @@ -269,7 +269,7 @@ : ^ `---- - x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer } + x Number { value: 1.0, raw: "1", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/minus/input.css:4:5] 4 | prop2: func(1 - 2); : ^ @@ -281,7 +281,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/minus/input.css:4:5] 4 | prop2: func(1 - 2); : ^ @@ -305,7 +305,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/minus/input.css:4:5] 4 | prop2: func(1 - 2); : ^ @@ -317,7 +317,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/minus/input.css:4:5] 4 | prop2: func(1 - 2); : ^ diff --git a/crates/swc_css_parser/tests/recovery/delim-token/plus/span.rust-debug b/crates/swc_css_parser/tests/recovery/delim-token/plus/span.rust-debug index 307167a76960..916a89758c5f 100644 --- a/crates/swc_css_parser/tests/recovery/delim-token/plus/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/delim-token/plus/span.rust-debug @@ -161,7 +161,7 @@ : ^ `---- - x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer } + x Number { value: 1.0, raw: "1", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/plus/input.css:3:5] 3 | prop1: 1 + 2; : ^ @@ -173,7 +173,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/plus/input.css:3:5] 3 | prop1: 1 + 2; : ^ @@ -197,7 +197,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/plus/input.css:3:5] 3 | prop1: 1 + 2; : ^ @@ -209,7 +209,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/plus/input.css:3:5] 3 | prop1: 1 + 2; : ^ @@ -269,7 +269,7 @@ : ^ `---- - x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer } + x Number { value: 1.0, raw: "1", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/plus/input.css:4:5] 4 | prop2: func(1 + 2); : ^ @@ -281,7 +281,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/plus/input.css:4:5] 4 | prop2: func(1 + 2); : ^ @@ -305,7 +305,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/delim-token/plus/input.css:4:5] 4 | prop2: func(1 + 2); : ^ @@ -317,7 +317,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/delim-token/plus/input.css:4:5] 4 | prop2: func(1 + 2); : ^ diff --git a/crates/swc_css_parser/tests/recovery/function-token/span.rust-debug b/crates/swc_css_parser/tests/recovery/function-token/span.rust-debug index 89b861f44a45..1e99403d9d9b 100644 --- a/crates/swc_css_parser/tests/recovery/function-token/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function-token/span.rust-debug @@ -132,7 +132,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function-token/input.css:2:5] 2 | prop: url("test") : : ^^^^^^ @@ -144,7 +144,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function-token/input.css:2:5] 2 | prop: url("test") : : ^ diff --git a/crates/swc_css_parser/tests/recovery/function/bad-comment-2/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/bad-comment-2/span.rust-debug index 0ccc5ef1755d..2056ca0d9367 100644 --- a/crates/swc_css_parser/tests/recovery/function/bad-comment-2/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/bad-comment-2/span.rust-debug @@ -131,10 +131,7 @@ 5 | `-> ); `---- - x BadUrl { name: Atom('url' type=static), raw_name: Atom('url' type=static), raw_value: Atom(' - | /* test */ - | "test.png" - | ' type=dynamic) } + x BadUrl { name: Atom('url' type=static), raw_name: "url", raw_value: "\n /* test */\n \"test.png\"\n " } ,-[$DIR/tests/recovery/function/bad-comment-2/input.css:2:5] 2 | ,-> background: url( 3 | | /* test */ diff --git a/crates/swc_css_parser/tests/recovery/function/bad-comment/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/bad-comment/span.rust-debug index e308e3a2132e..6f0fe0646d58 100644 --- a/crates/swc_css_parser/tests/recovery/function/bad-comment/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/bad-comment/span.rust-debug @@ -131,10 +131,7 @@ 5 | `-> ); `---- - x BadUrl { name: Atom('url' type=static), raw_name: Atom('url' type=static), raw_value: Atom(' - | /* test */ - | test.png - | ' type=dynamic) } + x BadUrl { name: Atom('url' type=static), raw_name: "url", raw_value: "\n /* test */\n test.png\n " } ,-[$DIR/tests/recovery/function/bad-comment/input.css:2:5] 2 | ,-> background: url( 3 | | /* test */ diff --git a/crates/swc_css_parser/tests/recovery/function/base/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/base/span.rust-debug index 38d2d2ee19c6..4de7a74af4bf 100644 --- a/crates/swc_css_parser/tests/recovery/function/base/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/base/span.rust-debug @@ -153,7 +153,7 @@ : ^ `---- - x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer } + x Number { value: 1.0, raw: "1", type_flag: Integer } ,-[$DIR/tests/recovery/function/base/input.css:2:5] 2 | prop: func(1 + 2); : ^ @@ -165,7 +165,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:2:5] 2 | prop: func(1 + 2); : ^ @@ -189,7 +189,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:2:5] 2 | prop: func(1 + 2); : ^ @@ -201,7 +201,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/function/base/input.css:2:5] 2 | prop: func(1 + 2); : ^ @@ -261,7 +261,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/function/base/input.css:3:5] 3 | prop: func(ident.ident); : ^^^^^ @@ -285,7 +285,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/function/base/input.css:3:5] 3 | prop: func(ident.ident); : ^^^^^ @@ -345,7 +345,7 @@ : ^^^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:4:5] 4 | prop: func3( ident.ident ); : ^^^ @@ -357,7 +357,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/function/base/input.css:4:5] 4 | prop: func3( ident.ident ); : ^^^^^ @@ -381,7 +381,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/function/base/input.css:4:5] 4 | prop: func3( ident.ident ); : ^^^^^ @@ -393,7 +393,7 @@ : ^^^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:4:5] 4 | prop: func3( ident.ident ); : ^^^ @@ -663,7 +663,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:7:5] 7 | prop: func({ foo: bar }); : ^ @@ -675,7 +675,7 @@ : ^^^ `---- - x Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + x Ident { value: Atom('foo' type=inline), raw: "foo" } ,-[$DIR/tests/recovery/function/base/input.css:7:5] 7 | prop: func({ foo: bar }); : ^^^ @@ -699,7 +699,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:7:5] 7 | prop: func({ foo: bar }); : ^ @@ -711,7 +711,7 @@ : ^^^ `---- - x Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + x Ident { value: Atom('bar' type=inline), raw: "bar" } ,-[$DIR/tests/recovery/function/base/input.css:7:5] 7 | prop: func({ foo: bar }); : ^^^ @@ -723,7 +723,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/base/input.css:7:5] 7 | prop: func({ foo: bar }); : ^ diff --git a/crates/swc_css_parser/tests/recovery/function/calc/space/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/calc/space/span.rust-debug index ab170f1c806b..f07e89c42f51 100644 --- a/crates/swc_css_parser/tests/recovery/function/calc/space/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/calc/space/span.rust-debug @@ -123,7 +123,7 @@ : ^^^ `---- - x Dimension { value: 2.0, raw_value: Atom('2' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 2.0, raw_value: "2", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/function/calc/space/input.css:2:5] 2 | width: calc(2px+1px); : ^^^ @@ -135,7 +135,7 @@ : ^^^^ `---- - x Dimension { value: 1.0, raw_value: Atom('+1' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 1.0, raw_value: "+1", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/function/calc/space/input.css:2:5] 2 | width: calc(2px+1px); : ^^^^ diff --git a/crates/swc_css_parser/tests/recovery/function/rgb/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/rgb/span.rust-debug index f4a677e9281c..64bed48812eb 100644 --- a/crates/swc_css_parser/tests/recovery/function/rgb/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/rgb/span.rust-debug @@ -181,7 +181,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:2:5] 2 | color: rgb("test"); : ^^^^^^ @@ -247,7 +247,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:4:5] 4 | color: rgb("test", 100, 100); : ^^^^^^ @@ -271,7 +271,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:4:5] 4 | color: rgb("test", 100, 100); : ^ @@ -283,7 +283,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:4:5] 4 | color: rgb("test", 100, 100); : ^^^ @@ -307,7 +307,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:4:5] 4 | color: rgb("test", 100, 100); : ^ @@ -319,7 +319,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:4:5] 4 | color: rgb("test", 100, 100); : ^^^ @@ -385,7 +385,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:5:5] 5 | color: rgb(100, "test", 100); : ^^^ @@ -409,7 +409,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:5:5] 5 | color: rgb(100, "test", 100); : ^ @@ -421,7 +421,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:5:5] 5 | color: rgb(100, "test", 100); : ^^^^^^ @@ -445,7 +445,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:5:5] 5 | color: rgb(100, "test", 100); : ^ @@ -457,7 +457,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:5:5] 5 | color: rgb(100, "test", 100); : ^^^ @@ -523,7 +523,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:6:5] 6 | color: rgb(100, 100, "test"); : ^^^ @@ -547,7 +547,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:6:5] 6 | color: rgb(100, 100, "test"); : ^ @@ -559,7 +559,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:6:5] 6 | color: rgb(100, 100, "test"); : ^^^ @@ -583,7 +583,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:6:5] 6 | color: rgb(100, 100, "test"); : ^ @@ -595,7 +595,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:6:5] 6 | color: rgb(100, 100, "test"); : ^^^^^^ @@ -661,7 +661,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^^^ @@ -685,7 +685,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^ @@ -697,7 +697,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^^^ @@ -721,7 +721,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^ @@ -733,7 +733,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^^^ @@ -757,7 +757,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^ @@ -769,7 +769,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:7:5] 7 | color: rgb(100, 100, 100, "test"); : ^^^^^^ @@ -835,7 +835,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:9:5] 9 | color: rgb("test" 100 100); : ^^^^^^ @@ -847,7 +847,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:9:5] 9 | color: rgb("test" 100 100); : ^ @@ -859,7 +859,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:9:5] 9 | color: rgb("test" 100 100); : ^^^ @@ -871,7 +871,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:9:5] 9 | color: rgb("test" 100 100); : ^ @@ -883,7 +883,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:9:5] 9 | color: rgb("test" 100 100); : ^^^ @@ -949,7 +949,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:10:5] 10 | color: rgb(100 "test" 100); : ^^^ @@ -961,7 +961,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:10:5] 10 | color: rgb(100 "test" 100); : ^ @@ -973,7 +973,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:10:5] 10 | color: rgb(100 "test" 100); : ^^^^^^ @@ -985,7 +985,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:10:5] 10 | color: rgb(100 "test" 100); : ^ @@ -997,7 +997,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:10:5] 10 | color: rgb(100 "test" 100); : ^^^ @@ -1063,7 +1063,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:11:5] 11 | color: rgb(100 100 "test"); : ^^^ @@ -1075,7 +1075,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:11:5] 11 | color: rgb(100 100 "test"); : ^ @@ -1087,7 +1087,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:11:5] 11 | color: rgb(100 100 "test"); : ^^^ @@ -1099,7 +1099,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:11:5] 11 | color: rgb(100 100 "test"); : ^ @@ -1111,7 +1111,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:11:5] 11 | color: rgb(100 100 "test"); : ^^^^^^ @@ -1177,7 +1177,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^^^ @@ -1189,7 +1189,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^ @@ -1201,7 +1201,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^^^ @@ -1213,7 +1213,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^ @@ -1225,7 +1225,7 @@ : ^^^ `---- - x Number { value: 100.0, raw: Atom('100' type=inline), type_flag: Integer } + x Number { value: 100.0, raw: "100", type_flag: Integer } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^^^ @@ -1237,7 +1237,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^ @@ -1261,7 +1261,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^ @@ -1273,7 +1273,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/function/rgb/input.css:12:5] 12 | color: rgb(100 100 100 / "test"); : ^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/function/unclosed-2/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/unclosed-2/span.rust-debug index 4f19225f7e75..bb5dc7902127 100644 --- a/crates/swc_css_parser/tests/recovery/function/unclosed-2/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/unclosed-2/span.rust-debug @@ -123,7 +123,7 @@ : ^ `---- - x Number { value: 4.0, raw: Atom('4' type=inline), type_flag: Integer } + x Number { value: 4.0, raw: "4", type_flag: Integer } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start] 12px : ^ @@ -147,7 +147,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start] 12px : ^ @@ -177,7 +177,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('col-start' type=dynamic), raw: Atom('col-start' type=dynamic) } + x Ident { value: Atom('col-start' type=dynamic), raw: "col-start" } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start] 12px : ^^^^^^^^^ @@ -189,7 +189,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start] 12px : ^ @@ -201,7 +201,7 @@ : ^^^^ `---- - x Dimension { value: 12.0, raw_value: Atom('12' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 12.0, raw_value: "12", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start] 12px : ^^^^ @@ -214,8 +214,7 @@ 3 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start] 12px : ^ @@ -240,8 +239,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/function/unclosed-2/input.css:3:1] 3 | } : ^ diff --git a/crates/swc_css_parser/tests/recovery/function/unclosed/span.rust-debug b/crates/swc_css_parser/tests/recovery/function/unclosed/span.rust-debug index b1f9ad5f5906..b42daf3c9eeb 100644 --- a/crates/swc_css_parser/tests/recovery/function/unclosed/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/function/unclosed/span.rust-debug @@ -123,7 +123,7 @@ : ^^^^^ `---- - x Dimension { value: 500.0, raw_value: Atom('500' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 500.0, raw_value: "500", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/function/unclosed/input.css:2:5] 2 | width: min(500px; : ^^^^^ @@ -148,8 +148,7 @@ 3 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/function/unclosed/input.css:2:5] 2 | width: min(500px; : ^ @@ -174,8 +173,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/function/unclosed/input.css:3:1] 3 | } : ^ diff --git a/crates/swc_css_parser/tests/recovery/hacks/span.rust-debug b/crates/swc_css_parser/tests/recovery/hacks/span.rust-debug index a3edd687ea77..70b9ae673c59 100644 --- a/crates/swc_css_parser/tests/recovery/hacks/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/hacks/span.rust-debug @@ -865,7 +865,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:13:1] 13 | .selector { (;property: value;); } : ^^^^^^^^ @@ -889,7 +889,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:13:1] 13 | .selector { (;property: value;); } : ^ @@ -901,7 +901,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:13:1] 13 | .selector { (;property: value;); } : ^^^^^ @@ -1039,7 +1039,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:14:1] 14 | .selector { [;property: value;]; } : ^^^^^^^^ @@ -1063,7 +1063,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:14:1] 14 | .selector { [;property: value;]; } : ^ @@ -1075,7 +1075,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:14:1] 14 | .selector { [;property: value;]; } : ^^^^^ @@ -1135,7 +1135,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:16:1] 16 | @media \\0 screen {} : ^ @@ -1147,7 +1147,7 @@ : ^^^ `---- - x Ident { value: Atom('\0' type=inline), raw: Atom('\\0' type=inline) } + x Ident { value: Atom('\0' type=inline), raw: "\\\\0" } ,-[$DIR/tests/recovery/hacks/input.css:16:1] 16 | @media \\0 screen {} : ^^^ @@ -1159,7 +1159,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:16:1] 16 | @media \\0 screen {} : ^ @@ -1171,7 +1171,7 @@ : ^^^^^^ `---- - x Ident { value: Atom('screen' type=inline), raw: Atom('screen' type=inline) } + x Ident { value: Atom('screen' type=inline), raw: "screen" } ,-[$DIR/tests/recovery/hacks/input.css:16:1] 16 | @media \\0 screen {} : ^^^^^^ @@ -1183,7 +1183,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:16:1] 16 | @media \\0 screen {} : ^ @@ -5107,7 +5107,7 @@ : ^^^^^ `---- - x Ident { value: Atom('hover' type=inline), raw: Atom('hover' type=inline) } + x Ident { value: Atom('hover' type=inline), raw: "hover" } ,-[$DIR/tests/recovery/hacks/input.css:64:1] 64 | _:-moz-tree-row(hover), .selector {} : ^^^^^ @@ -7873,7 +7873,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:104:5] 104 | !property: value; : ^^^^^^^^ @@ -7897,7 +7897,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:104:5] 104 | !property: value; : ^ @@ -7909,7 +7909,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:104:5] 104 | !property: value; : ^^^^^ @@ -8065,7 +8065,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:108:5] 108 | $property: value; : ^^^^^^^^ @@ -8089,7 +8089,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:108:5] 108 | $property: value; : ^ @@ -8101,7 +8101,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:108:5] 108 | $property: value; : ^^^^^ @@ -8257,7 +8257,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:112:5] 112 | &property: value; : ^^^^^^^^ @@ -8281,7 +8281,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:112:5] 112 | &property: value; : ^ @@ -8293,7 +8293,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:112:5] 112 | &property: value; : ^^^^^ @@ -8449,7 +8449,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:116:5] 116 | *property: value; : ^^^^^^^^ @@ -8473,7 +8473,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:116:5] 116 | *property: value; : ^ @@ -8485,7 +8485,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:116:5] 116 | *property: value; : ^^^^^ @@ -8641,7 +8641,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:120:5] 120 | )property: value; : ^^^^^^^^ @@ -8665,7 +8665,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:120:5] 120 | )property: value; : ^ @@ -8677,7 +8677,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:120:5] 120 | )property: value; : ^^^^^ @@ -8833,7 +8833,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:124:5] 124 | =property: value; : ^^^^^^^^ @@ -8857,7 +8857,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:124:5] 124 | =property: value; : ^ @@ -8869,7 +8869,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:124:5] 124 | =property: value; : ^^^^^ @@ -9025,7 +9025,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:128:5] 128 | %property: value; : ^^^^^^^^ @@ -9049,7 +9049,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:128:5] 128 | %property: value; : ^ @@ -9061,7 +9061,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:128:5] 128 | %property: value; : ^^^^^ @@ -9217,7 +9217,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:132:5] 132 | +property: value; : ^^^^^^^^ @@ -9241,7 +9241,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:132:5] 132 | +property: value; : ^ @@ -9253,7 +9253,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:132:5] 132 | +property: value; : ^^^^^ @@ -9469,7 +9469,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:136:5] 136 | @property: value; : ^ @@ -9481,7 +9481,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:136:5] 136 | @property: value; : ^^^^^ @@ -9583,7 +9583,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:140:5] 140 | ,property: value; : ^^^^^^^^ @@ -9607,7 +9607,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:140:5] 140 | ,property: value; : ^ @@ -9619,7 +9619,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:140:5] 140 | ,property: value; : ^^^^^ @@ -9775,7 +9775,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:144:5] 144 | .property: value; : ^^^^^^^^ @@ -9799,7 +9799,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:144:5] 144 | .property: value; : ^ @@ -9811,7 +9811,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:144:5] 144 | .property: value; : ^^^^^ @@ -9967,7 +9967,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:148:5] 148 | /property: value; : ^^^^^^^^ @@ -9991,7 +9991,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:148:5] 148 | /property: value; : ^ @@ -10003,7 +10003,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:148:5] 148 | /property: value; : ^^^^^ @@ -10159,7 +10159,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:152:5] 152 | `property: value; : ^^^^^^^^ @@ -10183,7 +10183,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:152:5] 152 | `property: value; : ^ @@ -10195,7 +10195,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:152:5] 152 | `property: value; : ^^^^^ @@ -10351,7 +10351,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:156:5] 156 | ]property: value; : ^^^^^^^^ @@ -10375,7 +10375,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:156:5] 156 | ]property: value; : ^ @@ -10387,7 +10387,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:156:5] 156 | ]property: value; : ^^^^^ @@ -10531,7 +10531,7 @@ : ^^^^^^^^^ `---- - x Hash { is_id: true, value: Atom('property' type=static), raw: Atom('property' type=static) } + x Hash { is_id: true, value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:160:5] 160 | #property: value; : ^^^^^^^^^ @@ -10555,7 +10555,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:160:5] 160 | #property: value; : ^ @@ -10567,7 +10567,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:160:5] 160 | #property: value; : ^^^^^ @@ -10723,7 +10723,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:164:5] 164 | ~property: value; : ^^^^^^^^ @@ -10747,7 +10747,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:164:5] 164 | ~property: value; : ^ @@ -10759,7 +10759,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:164:5] 164 | ~property: value; : ^^^^^ @@ -10915,7 +10915,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:168:5] 168 | ?property: value; : ^^^^^^^^ @@ -10939,7 +10939,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:168:5] 168 | ?property: value; : ^ @@ -10951,7 +10951,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:168:5] 168 | ?property: value; : ^^^^^ @@ -11107,7 +11107,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:172:5] 172 | :property: value; : ^^^^^^^^ @@ -11131,7 +11131,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:172:5] 172 | :property: value; : ^ @@ -11143,7 +11143,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:172:5] 172 | :property: value; : ^^^^^ @@ -11299,7 +11299,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:176:5] 176 | |property: value; : ^^^^^^^^ @@ -11323,7 +11323,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:176:5] 176 | |property: value; : ^ @@ -11335,7 +11335,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:176:5] 176 | |property: value; : ^^^^^ @@ -11491,7 +11491,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:180:1] 180 | .selector { property: value !ie; } : ^^^^^ @@ -11503,7 +11503,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:180:1] 180 | .selector { property: value !ie; } : ^ @@ -11527,7 +11527,7 @@ : ^^ `---- - x Ident { value: Atom('ie' type=inline), raw: Atom('ie' type=inline) } + x Ident { value: Atom('ie' type=inline), raw: "ie" } ,-[$DIR/tests/recovery/hacks/input.css:180:1] 180 | .selector { property: value !ie; } : ^^ @@ -12835,7 +12835,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:204:1] 204 | .selector { (;property: value;); } : ^^^^^^^^ @@ -12859,7 +12859,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:204:1] 204 | .selector { (;property: value;); } : ^ @@ -12871,7 +12871,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:204:1] 204 | .selector { (;property: value;); } : ^^^^^ @@ -13009,7 +13009,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:205:1] 205 | .selector { [;property: value;]; } : ^^^^^^^^ @@ -13033,7 +13033,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:205:1] 205 | .selector { [;property: value;]; } : ^ @@ -13045,7 +13045,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:205:1] 205 | .selector { [;property: value;]; } : ^^^^^ @@ -14551,7 +14551,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:225:1] 225 | .selector { (;property: value;); } : ^^^^^^^^ @@ -14575,7 +14575,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:225:1] 225 | .selector { (;property: value;); } : ^ @@ -14587,7 +14587,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:225:1] 225 | .selector { (;property: value;); } : ^^^^^ @@ -14725,7 +14725,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('property' type=static), raw: Atom('property' type=static) } + x Ident { value: Atom('property' type=static), raw: "property" } ,-[$DIR/tests/recovery/hacks/input.css:226:1] 226 | .selector { [;property: value;]; } : ^^^^^^^^ @@ -14749,7 +14749,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:226:1] 226 | .selector { [;property: value;]; } : ^ @@ -14761,7 +14761,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/hacks/input.css:226:1] 226 | .selector { [;property: value;]; } : ^^^^^ @@ -15907,7 +15907,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:241:1] 241 | @media \\0 screen {} : ^ @@ -15919,7 +15919,7 @@ : ^^^ `---- - x Ident { value: Atom('\0' type=inline), raw: Atom('\\0' type=inline) } + x Ident { value: Atom('\0' type=inline), raw: "\\\\0" } ,-[$DIR/tests/recovery/hacks/input.css:241:1] 241 | @media \\0 screen {} : ^^^ @@ -15931,7 +15931,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:241:1] 241 | @media \\0 screen {} : ^ @@ -15943,7 +15943,7 @@ : ^^^^^^ `---- - x Ident { value: Atom('screen' type=inline), raw: Atom('screen' type=inline) } + x Ident { value: Atom('screen' type=inline), raw: "screen" } ,-[$DIR/tests/recovery/hacks/input.css:241:1] 241 | @media \\0 screen {} : ^^^^^^ @@ -15955,7 +15955,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:241:1] 241 | @media \\0 screen {} : ^ @@ -16081,7 +16081,7 @@ : ^^^^^ `---- - x Ident { value: Atom('color' type=static), raw: Atom('color' type=static) } + x Ident { value: Atom('color' type=static), raw: "color" } ,-[$DIR/tests/recovery/hacks/input.css:244:5] 244 | *color : black; : ^^^^^ @@ -16093,7 +16093,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:244:5] 244 | *color : black; : ^ @@ -16117,7 +16117,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:244:5] 244 | *color : black; : ^ @@ -16129,7 +16129,7 @@ : ^^^^^ `---- - x Ident { value: Atom('black' type=inline), raw: Atom('black' type=inline) } + x Ident { value: Atom('black' type=inline), raw: "black" } ,-[$DIR/tests/recovery/hacks/input.css:244:5] 244 | *color : black; : ^^^^^ @@ -16279,7 +16279,7 @@ : ^^^ `---- - x Ident { value: Atom('var' type=static), raw: Atom('var' type=static) } + x Ident { value: Atom('var' type=static), raw: "var" } ,-[$DIR/tests/recovery/hacks/input.css:247:5] 247 | $(var)-size: 100%; : ^^^ @@ -16291,7 +16291,7 @@ : ^^^^^ `---- - x Ident { value: Atom('-size' type=inline), raw: Atom('-size' type=inline) } + x Ident { value: Atom('-size' type=inline), raw: "-size" } ,-[$DIR/tests/recovery/hacks/input.css:247:5] 247 | $(var)-size: 100%; : ^^^^^ @@ -16315,7 +16315,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/hacks/input.css:247:5] 247 | $(var)-size: 100%; : ^ @@ -16327,7 +16327,7 @@ : ^^^^ `---- - x Percentage { value: 100.0, raw: Atom('100' type=inline) } + x Percentage { value: 100.0, raw: "100" } ,-[$DIR/tests/recovery/hacks/input.css:247:5] 247 | $(var)-size: 100%; : ^^^^ @@ -16441,7 +16441,7 @@ : ^ `---- - x Ident { value: Atom('b' type=static), raw: Atom('b' type=static) } + x Ident { value: Atom('b' type=static), raw: "b" } ,-[$DIR/tests/recovery/hacks/input.css:250:1] 250 | a{*b:c} : ^ @@ -16465,7 +16465,7 @@ : ^ `---- - x Ident { value: Atom('c' type=inline), raw: Atom('c' type=inline) } + x Ident { value: Atom('c' type=inline), raw: "c" } ,-[$DIR/tests/recovery/hacks/input.css:250:1] 250 | a{*b:c} : ^ diff --git a/crates/swc_css_parser/tests/recovery/ie-progid/span.rust-debug b/crates/swc_css_parser/tests/recovery/ie-progid/span.rust-debug index 42aa89a36b63..6d6396635edd 100644 --- a/crates/swc_css_parser/tests/recovery/ie-progid/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/ie-progid/span.rust-debug @@ -115,7 +115,7 @@ : ^^^^^^ `---- - x Ident { value: Atom('progid' type=inline), raw: Atom('progid' type=inline) } + x Ident { value: Atom('progid' type=inline), raw: "progid" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^ @@ -139,7 +139,7 @@ : ^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('DXImageTransform' type=dynamic), raw: Atom('DXImageTransform' type=dynamic) } + x Ident { value: Atom('DXImageTransform' type=dynamic), raw: "DXImageTransform" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('Microsoft' type=dynamic), raw: Atom('Microsoft' type=dynamic) } + x Ident { value: Atom('Microsoft' type=dynamic), raw: "Microsoft" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^ @@ -205,7 +205,7 @@ : ^^^^^^^^^^^^^ `---- - x Ident { value: Atom('startColorstr' type=dynamic), raw: Atom('startColorstr' type=dynamic) } + x Ident { value: Atom('startColorstr' type=dynamic), raw: "startColorstr" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^^^^^ @@ -229,7 +229,7 @@ : ^^^^^^^^^ `---- - x String { value: Atom('#4f4f4f' type=inline), raw: Atom(''#4f4f4f'' type=dynamic) } + x String { value: Atom('#4f4f4f' type=inline), raw: "'#4f4f4f'" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^ @@ -253,7 +253,7 @@ : ^^^^^^^^^^^ `---- - x Ident { value: Atom('endColorstr' type=dynamic), raw: Atom('endColorstr' type=dynamic) } + x Ident { value: Atom('endColorstr' type=dynamic), raw: "endColorstr" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^^^ @@ -277,7 +277,7 @@ : ^^^^^^^^^ `---- - x String { value: Atom('#292929' type=inline), raw: Atom(''#292929'' type=dynamic) } + x String { value: Atom('#292929' type=inline), raw: "'#292929'" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^ @@ -301,7 +301,7 @@ : ^^^^^^^^^^^^ `---- - x Ident { value: Atom('GradientType' type=dynamic), raw: Atom('GradientType' type=dynamic) } + x Ident { value: Atom('GradientType' type=dynamic), raw: "GradientType" } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^^^^^^^^^^^^ @@ -325,7 +325,7 @@ : ^ `---- - x Number { value: 0.0, raw: Atom('0' type=inline), type_flag: Integer } + x Number { value: 0.0, raw: "0", type_flag: Integer } ,-[$DIR/tests/recovery/ie-progid/input.css:2:5] 2 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4f4f4f',endColorstr='#292929',GradientType=0); : ^ @@ -367,7 +367,7 @@ : ^^^^^^ `---- - x Ident { value: Atom('progid' type=inline), raw: Atom('progid' type=inline) } + x Ident { value: Atom('progid' type=inline), raw: "progid" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^ @@ -391,7 +391,7 @@ : ^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('DXImageTransform' type=dynamic), raw: Atom('DXImageTransform' type=dynamic) } + x Ident { value: Atom('DXImageTransform' type=dynamic), raw: "DXImageTransform" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^^^^^^^^^^^ @@ -415,7 +415,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('Microsoft' type=dynamic), raw: Atom('Microsoft' type=dynamic) } + x Ident { value: Atom('Microsoft' type=dynamic), raw: "Microsoft" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^^^^ @@ -457,7 +457,7 @@ : ^^^^^^^^^^^ `---- - x Ident { value: Atom('pixelradius' type=dynamic), raw: Atom('pixelradius' type=dynamic) } + x Ident { value: Atom('pixelradius' type=dynamic), raw: "pixelradius" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^^^^^^ @@ -481,7 +481,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^ @@ -493,7 +493,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^ @@ -505,7 +505,7 @@ : ^^^^^^ `---- - x Ident { value: Atom('progid' type=inline), raw: Atom('progid' type=inline) } + x Ident { value: Atom('progid' type=inline), raw: "progid" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^ @@ -529,7 +529,7 @@ : ^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('DXImageTransform' type=dynamic), raw: Atom('DXImageTransform' type=dynamic) } + x Ident { value: Atom('DXImageTransform' type=dynamic), raw: "DXImageTransform" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^^^^^^^^^^^ @@ -553,7 +553,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('Microsoft' type=dynamic), raw: Atom('Microsoft' type=dynamic) } + x Ident { value: Atom('Microsoft' type=dynamic), raw: "Microsoft" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^^^^ @@ -595,7 +595,7 @@ : ^^^^^^^^ `---- - x Ident { value: Atom('duration' type=dynamic), raw: Atom('duration' type=dynamic) } + x Ident { value: Atom('duration' type=dynamic), raw: "duration" } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^^^^^^^^ @@ -619,7 +619,7 @@ : ^ `---- - x Number { value: 3.0, raw: Atom('3' type=inline), type_flag: Integer } + x Number { value: 3.0, raw: "3", type_flag: Integer } ,-[$DIR/tests/recovery/ie-progid/input.css:3:5] 3 | filter: progid:DXImageTransform.Microsoft.Blur(pixelradius=2) progid:DXImageTransform.Microsoft.Wheel(duration=3); : ^ diff --git a/crates/swc_css_parser/tests/recovery/number/span.rust-debug b/crates/swc_css_parser/tests/recovery/number/span.rust-debug index c96074f96c92..876bc217f11b 100644 --- a/crates/swc_css_parser/tests/recovery/number/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/number/span.rust-debug @@ -132,7 +132,7 @@ : ^^^^^^^ `---- - x Dimension { value: 10.1, raw_value: Atom('10.10' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Number } + x Dimension { value: 10.1, raw_value: "10.10", unit: Atom('px' type=static), raw_unit: "px", type_flag: Number } ,-[$DIR/tests/recovery/number/input.css:2:5] 2 | prop: 10.10px : ^^^^^^^ @@ -144,8 +144,7 @@ 3 | `-> prop1: 10px `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/number/input.css:2:5] 2 | ,-> prop: 10.10px 3 | `-> prop1: 10px @@ -157,7 +156,7 @@ : ^^^^^ `---- - x Ident { value: Atom('prop1' type=inline), raw: Atom('prop1' type=inline) } + x Ident { value: Atom('prop1' type=inline), raw: "prop1" } ,-[$DIR/tests/recovery/number/input.css:3:5] 3 | prop1: 10px : ^^^^^ @@ -181,7 +180,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/number/input.css:3:5] 3 | prop1: 10px : ^ @@ -193,7 +192,7 @@ : ^^^^ `---- - x Dimension { value: 10.0, raw_value: Atom('10' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 10.0, raw_value: "10", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/number/input.css:3:5] 3 | prop1: 10px : ^^^^ @@ -205,8 +204,7 @@ 4 | `-> prop2: 10 `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/number/input.css:3:5] 3 | ,-> prop1: 10px 4 | `-> prop2: 10 @@ -218,7 +216,7 @@ : ^^^^^ `---- - x Ident { value: Atom('prop2' type=inline), raw: Atom('prop2' type=inline) } + x Ident { value: Atom('prop2' type=inline), raw: "prop2" } ,-[$DIR/tests/recovery/number/input.css:4:5] 4 | prop2: 10 : ^^^^^ @@ -242,7 +240,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/number/input.css:4:5] 4 | prop2: 10 : ^ @@ -254,7 +252,7 @@ : ^^ `---- - x Number { value: 10.0, raw: Atom('10' type=inline), type_flag: Integer } + x Number { value: 10.0, raw: "10", type_flag: Integer } ,-[$DIR/tests/recovery/number/input.css:4:5] 4 | prop2: 10 : ^^ @@ -266,8 +264,7 @@ 5 | `-> prop3: 10.10 `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/number/input.css:4:5] 4 | ,-> prop2: 10 5 | `-> prop3: 10.10 @@ -279,7 +276,7 @@ : ^^^^^ `---- - x Ident { value: Atom('prop3' type=inline), raw: Atom('prop3' type=inline) } + x Ident { value: Atom('prop3' type=inline), raw: "prop3" } ,-[$DIR/tests/recovery/number/input.css:5:5] 5 | prop3: 10.10 : ^^^^^ @@ -303,7 +300,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/number/input.css:5:5] 5 | prop3: 10.10 : ^ @@ -315,7 +312,7 @@ : ^^^^^ `---- - x Number { value: 10.1, raw: Atom('10.10' type=inline), type_flag: Number } + x Number { value: 10.1, raw: "10.10", type_flag: Number } ,-[$DIR/tests/recovery/number/input.css:5:5] 5 | prop3: 10.10 : ^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/qualified-rule/basic/span.rust-debug b/crates/swc_css_parser/tests/recovery/qualified-rule/basic/span.rust-debug index 30ee065ccfb6..e55a4436d093 100644 --- a/crates/swc_css_parser/tests/recovery/qualified-rule/basic/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/qualified-rule/basic/span.rust-debug @@ -56,7 +56,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/qualified-rule/basic/input.css:1:1] 1 | // test : ^ @@ -68,7 +68,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/qualified-rule/basic/input.css:1:1] 1 | // test : ^^^^ @@ -81,9 +81,7 @@ 3 | a { `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/qualified-rule/basic/input.css:1:1] 1 | ,-> // test 2 | `-> @@ -96,7 +94,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/qualified-rule/basic/input.css:3:1] 3 | a { : ^ @@ -108,7 +106,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/qualified-rule/basic/input.css:3:1] 3 | a { : ^ diff --git a/crates/swc_css_parser/tests/recovery/qualified-rule/double-slash-comment/span.rust-debug b/crates/swc_css_parser/tests/recovery/qualified-rule/double-slash-comment/span.rust-debug index 1f5264c2a45b..d2121bac43d7 100644 --- a/crates/swc_css_parser/tests/recovery/qualified-rule/double-slash-comment/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/qualified-rule/double-slash-comment/span.rust-debug @@ -53,7 +53,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/qualified-rule/double-slash-comment/input.css:1:1] 1 | // test : ^ @@ -65,7 +65,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/qualified-rule/double-slash-comment/input.css:1:1] 1 | // test : ^^^^ @@ -78,8 +78,7 @@ 2 | a { `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/qualified-rule/double-slash-comment/input.css:1:1] 1 | // test : ^ @@ -92,7 +91,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/qualified-rule/double-slash-comment/input.css:2:1] 2 | a { : ^ @@ -104,7 +103,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/qualified-rule/double-slash-comment/input.css:2:1] 2 | a { : ^ diff --git a/crates/swc_css_parser/tests/recovery/rules/at-rule-in-middle/span.rust-debug b/crates/swc_css_parser/tests/recovery/rules/at-rule-in-middle/span.rust-debug index f4b25b1286d8..8c0f8dd9bda9 100644 --- a/crates/swc_css_parser/tests/recovery/rules/at-rule-in-middle/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/rules/at-rule-in-middle/span.rust-debug @@ -185,9 +185,7 @@ 5 | a { color: blue } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/rules/at-rule-in-middle/input.css:3:1] 3 | ,-> @media {}; 4 | `-> @@ -200,7 +198,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/rules/at-rule-in-middle/input.css:5:1] 5 | a { color: blue } : ^ @@ -212,7 +210,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/at-rule-in-middle/input.css:5:1] 5 | a { color: blue } : ^ diff --git a/crates/swc_css_parser/tests/recovery/rules/at-rule-with-semi/span.rust-debug b/crates/swc_css_parser/tests/recovery/rules/at-rule-with-semi/span.rust-debug index 61bbe3c7cf6d..8836dcba0d3e 100644 --- a/crates/swc_css_parser/tests/recovery/rules/at-rule-with-semi/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/rules/at-rule-with-semi/span.rust-debug @@ -77,9 +77,7 @@ 3 | a { color: red } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/rules/at-rule-with-semi/input.css:1:1] 1 | ,-> @media {}; 2 | `-> @@ -92,7 +90,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/rules/at-rule-with-semi/input.css:3:1] 3 | a { color: red } : ^ @@ -104,7 +102,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/at-rule-with-semi/input.css:3:1] 3 | a { color: red } : ^ diff --git a/crates/swc_css_parser/tests/recovery/rules/unclosed-brackets/span.rust-debug b/crates/swc_css_parser/tests/recovery/rules/unclosed-brackets/span.rust-debug index 48dd3e9854be..dbd8d01139cf 100644 --- a/crates/swc_css_parser/tests/recovery/rules/unclosed-brackets/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/rules/unclosed-brackets/span.rust-debug @@ -39,7 +39,7 @@ : ^^^^^ `---- - x Ident { value: Atom('class' type=static), raw: Atom('class' type=static) } + x Ident { value: Atom('class' type=static), raw: "class" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:1:1] 1 | .class[attr= { : ^^^^^ @@ -79,7 +79,7 @@ : ^^^^ `---- - x Ident { value: Atom('attr' type=inline), raw: Atom('attr' type=inline) } + x Ident { value: Atom('attr' type=inline), raw: "attr" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:1:1] 1 | .class[attr= { : ^^^^ @@ -103,7 +103,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:1:1] 1 | .class[attr= { : ^ @@ -136,9 +136,7 @@ 3 | } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:1:1] 1 | ,-> .class[attr= { 2 | `-> @@ -152,9 +150,7 @@ 5 | .class { color: red } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:3:1] 3 | ,-> } 4 | `-> @@ -179,7 +175,7 @@ : ^^^^^ `---- - x Ident { value: Atom('class' type=static), raw: Atom('class' type=static) } + x Ident { value: Atom('class' type=static), raw: "class" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^^^^^ @@ -191,7 +187,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^ @@ -221,7 +217,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^ @@ -233,7 +229,7 @@ : ^^^^^ `---- - x Ident { value: Atom('color' type=static), raw: Atom('color' type=static) } + x Ident { value: Atom('color' type=static), raw: "color" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^^^^^ @@ -257,7 +253,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^ @@ -269,7 +265,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^^^ @@ -281,7 +277,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | .class { color: red } : ^ @@ -294,9 +290,7 @@ 7 | .class { color: blue } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:5:1] 5 | ,-> .class { color: red } 6 | `-> @@ -321,7 +315,7 @@ : ^^^^^ `---- - x Ident { value: Atom('class' type=static), raw: Atom('class' type=static) } + x Ident { value: Atom('class' type=static), raw: "class" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^^^^^ @@ -333,7 +327,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^ @@ -363,7 +357,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^ @@ -375,7 +369,7 @@ : ^^^^^ `---- - x Ident { value: Atom('color' type=static), raw: Atom('color' type=static) } + x Ident { value: Atom('color' type=static), raw: "color" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^^^^^ @@ -399,7 +393,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^ @@ -411,7 +405,7 @@ : ^^^^ `---- - x Ident { value: Atom('blue' type=inline), raw: Atom('blue' type=inline) } + x Ident { value: Atom('blue' type=inline), raw: "blue" } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^^^^ @@ -423,7 +417,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-brackets/input.css:7:1] 7 | .class { color: blue } : ^ diff --git a/crates/swc_css_parser/tests/recovery/rules/unclosed-curly/span.rust-debug b/crates/swc_css_parser/tests/recovery/rules/unclosed-curly/span.rust-debug index f6e4b5a675cd..aea62d190afa 100644 --- a/crates/swc_css_parser/tests/recovery/rules/unclosed-curly/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/rules/unclosed-curly/span.rust-debug @@ -28,7 +28,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/rules/unclosed-curly/input.css:1:1] 1 | test}; : ^^^^ @@ -65,9 +65,7 @@ 3 | a { color: red } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/rules/unclosed-curly/input.css:1:1] 1 | ,-> test}; 2 | `-> @@ -80,7 +78,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/rules/unclosed-curly/input.css:3:1] 3 | a { color: red } : ^ @@ -92,7 +90,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/rules/unclosed-curly/input.css:3:1] 3 | a { color: red } : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-1/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-1/span.rust-debug index 9335b520cb23..b79a20fff552 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-1/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-1/span.rust-debug @@ -41,7 +41,7 @@ : ^^^^ `---- - x Ident { value: Atom('href' type=static), raw: Atom('href' type=static) } + x Ident { value: Atom('href' type=static), raw: "href" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-1/input.css:1:1] 1 | [href=] {} : ^^^^ @@ -65,7 +65,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-1/input.css:1:1] 1 | [href=] {} : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-2/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-2/span.rust-debug index 9200a830276b..e9d31d663882 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-2/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-2/span.rust-debug @@ -41,7 +41,7 @@ : ^^^^ `---- - x Ident { value: Atom('href' type=static), raw: Atom('href' type=static) } + x Ident { value: Atom('href' type=static), raw: "href" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-2/input.css:1:1] 1 | [href#="test"] {} : ^^^^ @@ -77,7 +77,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-2/input.css:1:1] 1 | [href#="test"] {} : ^^^^^^ @@ -89,7 +89,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-2/input.css:1:1] 1 | [href#="test"] {} : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-3/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-3/span.rust-debug index 89dfacb3c358..86b75ce28f32 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-3/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-3/span.rust-debug @@ -26,7 +26,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -56,7 +56,7 @@ : ^^^^^ `---- - x Ident { value: Atom('title' type=static), raw: Atom('title' type=static) } + x Ident { value: Atom('title' type=static), raw: "title" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^^^^^ @@ -68,7 +68,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -92,7 +92,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -116,7 +116,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -128,7 +128,7 @@ : ^^^^^^^ `---- - x String { value: Atom('title' type=static), raw: Atom('"title"' type=inline) } + x String { value: Atom('title' type=static), raw: "\"title\"" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^^^^^^^ @@ -140,7 +140,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -152,7 +152,7 @@ : ^ `---- - x Ident { value: Atom('i' type=static), raw: Atom('i' type=static) } + x Ident { value: Atom('i' type=static), raw: "i" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -164,7 +164,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ @@ -176,7 +176,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-3/input.css:1:1] 1 | a[title * = "title" i ] { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-4/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-4/span.rust-debug index b7c8047f2a5b..430b8cac7705 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-4/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher-4/span.rust-debug @@ -26,7 +26,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-4/input.css:1:1] 1 | a[title%="title"] { : ^ @@ -56,7 +56,7 @@ : ^^^^^ `---- - x Ident { value: Atom('title' type=static), raw: Atom('title' type=static) } + x Ident { value: Atom('title' type=static), raw: "title" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-4/input.css:1:1] 1 | a[title%="title"] { : ^^^^^ @@ -92,7 +92,7 @@ : ^^^^^^^ `---- - x String { value: Atom('title' type=static), raw: Atom('"title"' type=inline) } + x String { value: Atom('title' type=static), raw: "\"title\"" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-4/input.css:1:1] 1 | a[title%="title"] { : ^^^^^^^ @@ -104,7 +104,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher-4/input.css:1:1] 1 | a[title%="title"] { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher/span.rust-debug index c2e4e423d334..f6e817b15666 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-matcher/span.rust-debug @@ -41,7 +41,7 @@ : ^^^^ `---- - x Ident { value: Atom('href' type=static), raw: Atom('href' type=static) } + x Ident { value: Atom('href' type=static), raw: "href" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher/input.css:1:1] 1 | [href==".org"] {} : ^^^^ @@ -77,7 +77,7 @@ : ^^^^^^ `---- - x String { value: Atom('.org' type=inline), raw: Atom('".org"' type=inline) } + x String { value: Atom('.org' type=inline), raw: "\".org\"" } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher/input.css:1:1] 1 | [href==".org"] {} : ^^^^^^ @@ -89,7 +89,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-matcher/input.css:1:1] 1 | [href==".org"] {} : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-modifier/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-modifier/span.rust-debug index a5aab6124a23..7eb2e0530b34 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-modifier/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/invalid-modifier/span.rust-debug @@ -41,7 +41,7 @@ : ^^^^ `---- - x Ident { value: Atom('href' type=static), raw: Atom('href' type=static) } + x Ident { value: Atom('href' type=static), raw: "href" } ,-[$DIR/tests/recovery/selector/attribute/invalid-modifier/input.css:1:1] 1 | [href="test" "z"] {} : ^^^^ @@ -65,7 +65,7 @@ : ^^^^^^ `---- - x String { value: Atom('test' type=inline), raw: Atom('"test"' type=inline) } + x String { value: Atom('test' type=inline), raw: "\"test\"" } ,-[$DIR/tests/recovery/selector/attribute/invalid-modifier/input.css:1:1] 1 | [href="test" "z"] {} : ^^^^^^ @@ -77,7 +77,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-modifier/input.css:1:1] 1 | [href="test" "z"] {} : ^ @@ -89,7 +89,7 @@ : ^^^ `---- - x String { value: Atom('z' type=inline), raw: Atom('"z"' type=inline) } + x String { value: Atom('z' type=inline), raw: "\"z\"" } ,-[$DIR/tests/recovery/selector/attribute/invalid-modifier/input.css:1:1] 1 | [href="test" "z"] {} : ^^^ @@ -101,7 +101,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/invalid-modifier/input.css:1:1] 1 | [href="test" "z"] {} : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/attribute/unclosed/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/attribute/unclosed/span.rust-debug index 522bc30ba147..6dd150e11bf1 100644 --- a/crates/swc_css_parser/tests/recovery/selector/attribute/unclosed/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/attribute/unclosed/span.rust-debug @@ -31,7 +31,7 @@ : ^^^^^ `---- - x Ident { value: Atom('class' type=static), raw: Atom('class' type=static) } + x Ident { value: Atom('class' type=static), raw: "class" } ,-[$DIR/tests/recovery/selector/attribute/unclosed/input.css:1:1] 1 | .class[attr= { : ^^^^^ @@ -63,7 +63,7 @@ : ^^^^ `---- - x Ident { value: Atom('attr' type=inline), raw: Atom('attr' type=inline) } + x Ident { value: Atom('attr' type=inline), raw: "attr" } ,-[$DIR/tests/recovery/selector/attribute/unclosed/input.css:1:1] 1 | .class[attr= { : ^^^^ @@ -87,7 +87,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/attribute/unclosed/input.css:1:1] 1 | .class[attr= { : ^ @@ -120,9 +120,7 @@ 3 | } `---- - x WhiteSpace { value: Atom(' - | - | ' type=inline) } + x WhiteSpace { value: "\n\n" } ,-[$DIR/tests/recovery/selector/attribute/unclosed/input.css:1:1] 1 | ,-> .class[attr= { 2 | `-> @@ -135,8 +133,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/selector/attribute/unclosed/input.css:3:1] 3 | } : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/combinator/only/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/combinator/only/span.rust-debug index d53be8006f6d..a887c1b15036 100644 --- a/crates/swc_css_parser/tests/recovery/selector/combinator/only/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/combinator/only/span.rust-debug @@ -38,7 +38,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/combinator/only/input.css:1:1] 1 | > { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/combinator/two/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/combinator/two/span.rust-debug index 17ffaea2dbd3..48af46492cf3 100644 --- a/crates/swc_css_parser/tests/recovery/selector/combinator/two/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/combinator/two/span.rust-debug @@ -23,7 +23,7 @@ : ^^^^ `---- - x Ident { value: Atom('span' type=static), raw: Atom('span' type=static) } + x Ident { value: Atom('span' type=static), raw: "span" } ,-[$DIR/tests/recovery/selector/combinator/two/input.css:1:1] 1 | span ~ + {} : ^^^^ @@ -35,7 +35,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/combinator/two/input.css:1:1] 1 | span ~ + {} : ^ @@ -59,7 +59,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/combinator/two/input.css:1:1] 1 | span ~ + {} : ^ @@ -83,7 +83,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/combinator/two/input.css:1:1] 1 | span ~ + {} : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/id/invalid/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/id/invalid/span.rust-debug index 58fcbdf63803..ed166dfe4d48 100644 --- a/crates/swc_css_parser/tests/recovery/selector/id/invalid/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/id/invalid/span.rust-debug @@ -26,7 +26,7 @@ : ^^^^^ `---- - x Hash { is_id: false, value: Atom('1234' type=inline), raw: Atom('1234' type=inline) } + x Hash { is_id: false, value: Atom('1234' type=inline), raw: "1234" } ,-[$DIR/tests/recovery/selector/id/invalid/input.css:1:1] 1 | #1234 { : ^^^^^ @@ -38,7 +38,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/id/invalid/input.css:1:1] 1 | #1234 { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/list/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/list/span.rust-debug index 5d84948c4920..5d401d3d26e1 100644 --- a/crates/swc_css_parser/tests/recovery/selector/list/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/list/span.rust-debug @@ -35,7 +35,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/list/input.css:1:1] 1 | , { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/an-plus-b/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/an-plus-b/span.rust-debug index 421c77f72f84..a0c91692c3f3 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/an-plus-b/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/an-plus-b/span.rust-debug @@ -59,7 +59,7 @@ : ^^^^^^^ `---- - x Ident { value: Atom('unknown' type=static), raw: Atom('unknown' type=static) } + x Ident { value: Atom('unknown' type=static), raw: "unknown" } ,-[$DIR/tests/recovery/selector/pseudo-class/an-plus-b/input.css:1:1] 1 | :nth-child(unknown) {} : ^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-function/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-function/span.rust-debug index 5facd0348c49..7e95401a0323 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-function/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-function/span.rust-debug @@ -38,7 +38,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid-function/input.css:1:1] 1 | : nth-child(2) { : ^ @@ -68,7 +68,7 @@ : ^ `---- - x Number { value: 2.0, raw: Atom('2' type=inline), type_flag: Integer } + x Number { value: 2.0, raw: "2", type_flag: Integer } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid-function/input.css:1:1] 1 | : nth-child(2) { : ^ @@ -80,7 +80,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid-function/input.css:1:1] 1 | : nth-child(2) { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-ident/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-ident/span.rust-debug index eea51dcd198d..f6527e1b78b7 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-ident/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid-ident/span.rust-debug @@ -38,7 +38,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid-ident/input.css:1:1] 1 | : first-child { : ^ @@ -50,7 +50,7 @@ : ^^^^^^^^^^^ `---- - x Ident { value: Atom('first-child' type=static), raw: Atom('first-child' type=static) } + x Ident { value: Atom('first-child' type=static), raw: "first-child" } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid-ident/input.css:1:1] 1 | : first-child { : ^^^^^^^^^^^ @@ -62,7 +62,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid-ident/input.css:1:1] 1 | : first-child { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid/span.rust-debug index c2bb9c75200c..f4a060d03b86 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-class/invalid/span.rust-debug @@ -26,7 +26,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:1:1] 1 | a: b {} : ^ @@ -50,7 +50,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:1:1] 1 | a: b {} : ^ @@ -62,7 +62,7 @@ : ^ `---- - x Ident { value: Atom('b' type=static), raw: Atom('b' type=static) } + x Ident { value: Atom('b' type=static), raw: "b" } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:1:1] 1 | a: b {} : ^ @@ -74,7 +74,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:1:1] 1 | a: b {} : ^ @@ -112,7 +112,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:3:1] 3 | a: b { : ^ @@ -136,7 +136,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:3:1] 3 | a: b { : ^ @@ -148,7 +148,7 @@ : ^ `---- - x Ident { value: Atom('b' type=static), raw: Atom('b' type=static) } + x Ident { value: Atom('b' type=static), raw: "b" } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:3:1] 3 | a: b { : ^ @@ -160,7 +160,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-class/invalid/input.css:3:1] 3 | a: b { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-element/after/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-element/after/span.rust-debug index 443d14732d72..16cf7591c7fb 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-element/after/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-element/after/span.rust-debug @@ -50,7 +50,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-element/after/input.css:1:1] 1 | :: foo { : ^ @@ -62,7 +62,7 @@ : ^^^ `---- - x Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + x Ident { value: Atom('foo' type=inline), raw: "foo" } ,-[$DIR/tests/recovery/selector/pseudo-element/after/input.css:1:1] 1 | :: foo { : ^^^ @@ -74,7 +74,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-element/after/input.css:1:1] 1 | :: foo { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-element/between/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-element/between/span.rust-debug index e4560ac37c9e..24ad5aa9b64c 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-element/between/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-element/between/span.rust-debug @@ -38,7 +38,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-element/between/input.css:1:1] 1 | : :foo { : ^ @@ -62,7 +62,7 @@ : ^^^ `---- - x Ident { value: Atom('foo' type=inline), raw: Atom('foo' type=inline) } + x Ident { value: Atom('foo' type=inline), raw: "foo" } ,-[$DIR/tests/recovery/selector/pseudo-element/between/input.css:1:1] 1 | : :foo { : ^^^ @@ -74,7 +74,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-element/between/input.css:1:1] 1 | : :foo { : ^ diff --git a/crates/swc_css_parser/tests/recovery/selector/pseudo-element/invalid/span.rust-debug b/crates/swc_css_parser/tests/recovery/selector/pseudo-element/invalid/span.rust-debug index cbc36b01c35a..79bad6ccf902 100644 --- a/crates/swc_css_parser/tests/recovery/selector/pseudo-element/invalid/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/selector/pseudo-element/invalid/span.rust-debug @@ -23,7 +23,7 @@ : ^ `---- - x Ident { value: Atom('a' type=static), raw: Atom('a' type=static) } + x Ident { value: Atom('a' type=static), raw: "a" } ,-[$DIR/tests/recovery/selector/pseudo-element/invalid/input.css:1:1] 1 | a::1 { : ^ @@ -59,7 +59,7 @@ : ^ `---- - x Number { value: 1.0, raw: Atom('1' type=inline), type_flag: Integer } + x Number { value: 1.0, raw: "1", type_flag: Integer } ,-[$DIR/tests/recovery/selector/pseudo-element/invalid/input.css:1:1] 1 | a::1 { : ^ @@ -71,7 +71,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/selector/pseudo-element/invalid/input.css:1:1] 1 | a::1 { : ^ diff --git a/crates/swc_css_parser/tests/recovery/simple-block/unclosed-in-function/span.rust-debug b/crates/swc_css_parser/tests/recovery/simple-block/unclosed-in-function/span.rust-debug index a39e993d01c3..e9198d56418b 100644 --- a/crates/swc_css_parser/tests/recovery/simple-block/unclosed-in-function/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/simple-block/unclosed-in-function/span.rust-debug @@ -165,7 +165,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('col-start' type=dynamic), raw: Atom('col-start' type=dynamic) } + x Ident { value: Atom('col-start' type=dynamic), raw: "col-start" } ,-[$DIR/tests/recovery/simple-block/unclosed-in-function/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start); : ^^^^^^^^^ @@ -202,8 +202,7 @@ 3 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/simple-block/unclosed-in-function/input.css:2:5] 2 | grid-template-columns: repeat(4, [col-start); : ^ @@ -228,8 +227,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/simple-block/unclosed-in-function/input.css:3:1] 3 | } : ^ diff --git a/crates/swc_css_parser/tests/recovery/style-blocks-contents/basic/span.rust-debug b/crates/swc_css_parser/tests/recovery/style-blocks-contents/basic/span.rust-debug index df91c4aa280f..e535852f977c 100644 --- a/crates/swc_css_parser/tests/recovery/style-blocks-contents/basic/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/style-blocks-contents/basic/span.rust-debug @@ -301,7 +301,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:5:9] 5 | ident : ^^^^^ @@ -313,8 +313,7 @@ 6 | `-> color: green; `---- - x WhiteSpace { value: Atom(' - | ' type=dynamic) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:5:9] 5 | ,-> ident 6 | `-> color: green; @@ -326,7 +325,7 @@ : ^^^^^ `---- - x Ident { value: Atom('color' type=static), raw: Atom('color' type=static) } + x Ident { value: Atom('color' type=static), raw: "color" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:6:9] 6 | color: green; : ^^^^^ @@ -350,7 +349,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:6:9] 6 | color: green; : ^ @@ -362,7 +361,7 @@ : ^^^^^ `---- - x Ident { value: Atom('green' type=inline), raw: Atom('green' type=inline) } + x Ident { value: Atom('green' type=inline), raw: "green" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:6:9] 6 | color: green; : ^^^^^ @@ -672,7 +671,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:13:13] 13 | ident : ^^^^^ @@ -684,8 +683,7 @@ 14 | `-> color: red `---- - x WhiteSpace { value: Atom(' - | ' type=dynamic) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:13:13] 13 | ,-> ident 14 | `-> color: red @@ -697,7 +695,7 @@ : ^^^^^ `---- - x Ident { value: Atom('color' type=static), raw: Atom('color' type=static) } + x Ident { value: Atom('color' type=static), raw: "color" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:14:13] 14 | color: red : ^^^^^ @@ -721,7 +719,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:14:13] 14 | color: red : ^ @@ -733,7 +731,7 @@ : ^^^ `---- - x Ident { value: Atom('red' type=inline), raw: Atom('red' type=inline) } + x Ident { value: Atom('red' type=inline), raw: "red" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:14:13] 14 | color: red : ^^^ @@ -745,8 +743,7 @@ 15 | `-> } `---- - x WhiteSpace { value: Atom(' - | ' type=dynamic) } + x WhiteSpace { value: " \n " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:14:13] 14 | ,-> color: red 15 | `-> } @@ -1003,7 +1000,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:23:9] 23 | ident; : ^^^^^ @@ -1353,7 +1350,7 @@ : ^^^^^ `---- - x Ident { value: Atom('ident' type=inline), raw: Atom('ident' type=inline) } + x Ident { value: Atom('ident' type=inline), raw: "ident" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:31:13] 31 | ident; : ^^^^^ @@ -1551,7 +1548,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:39:5] 39 | & test; : ^ @@ -1563,7 +1560,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:39:5] 39 | & test; : ^^^^ @@ -1750,7 +1747,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:45:9] 45 | __ident__ : ^^^^^^^^^ @@ -1762,8 +1759,7 @@ 46 | `-> } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/style-blocks-contents/basic/input.css:45:9] 45 | ,-> __ident__ 46 | `-> } diff --git a/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested-2/span.rust-debug b/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested-2/span.rust-debug index 92df4b018133..e990cc53c863 100644 --- a/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested-2/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested-2/span.rust-debug @@ -156,7 +156,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/style-blocks-contents/invalid-nested-2/input.css:3:5] 3 | & test; : ^ @@ -168,7 +168,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/style-blocks-contents/invalid-nested-2/input.css:3:5] 3 | & test; : ^^^^ diff --git a/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested/span.rust-debug b/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested/span.rust-debug index a542b5754927..1805cca25d3f 100644 --- a/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/style-blocks-contents/invalid-nested/span.rust-debug @@ -156,7 +156,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/style-blocks-contents/invalid-nested/input.css:3:5] 3 | & test; : ^ @@ -168,7 +168,7 @@ : ^^^^ `---- - x Ident { value: Atom('test' type=inline), raw: Atom('test' type=inline) } + x Ident { value: Atom('test' type=inline), raw: "test" } ,-[$DIR/tests/recovery/style-blocks-contents/invalid-nested/input.css:3:5] 3 | & test; : ^^^^ diff --git a/crates/swc_css_parser/tests/recovery/styled-jsx/1/span.rust-debug b/crates/swc_css_parser/tests/recovery/styled-jsx/1/span.rust-debug index e746fd968e70..ddaf6c53fa92 100644 --- a/crates/swc_css_parser/tests/recovery/styled-jsx/1/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/styled-jsx/1/span.rust-debug @@ -326,7 +326,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:7:1] 7 | .removed-214123 :global(> .removed-214123-item) { : ^ @@ -350,7 +350,7 @@ : ^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('removed-214123-item' type=dynamic), raw: Atom('removed-214123-item' type=dynamic) } + x Ident { value: Atom('removed-214123-item' type=dynamic), raw: "removed-214123-item" } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:7:1] 7 | .removed-214123 :global(> .removed-214123-item) { : ^^^^^^^^^^^^^^^^^^^ @@ -492,7 +492,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__2' type=dynamic), raw: Atom('__styled-jsx-placeholder__2' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__2' type=dynamic), raw: "__styled-jsx-placeholder__2" } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:10:5] 10 | flex-basis: __styled-jsx-placeholder__2%; : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -726,7 +726,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:15:5] 15 | .removed-214123 :global(> .removed-214123-item) { : ^ @@ -750,7 +750,7 @@ : ^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('removed-214123-item' type=dynamic), raw: Atom('removed-214123-item' type=dynamic) } + x Ident { value: Atom('removed-214123-item' type=dynamic), raw: "removed-214123-item" } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:15:5] 15 | .removed-214123 :global(> .removed-214123-item) { : ^^^^^^^^^^^^^^^^^^^ @@ -805,7 +805,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__3' type=dynamic), raw: Atom('__styled-jsx-placeholder__3' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__3' type=dynamic), raw: "__styled-jsx-placeholder__3" } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:16:9] 16 | flex-basis: __styled-jsx-placeholder__3%; : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -997,7 +997,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:21:5] 21 | .removed-214123 :global(> .removed-214123-item) { : ^ @@ -1021,7 +1021,7 @@ : ^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('removed-214123-item' type=dynamic), raw: Atom('removed-214123-item' type=dynamic) } + x Ident { value: Atom('removed-214123-item' type=dynamic), raw: "removed-214123-item" } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:21:5] 21 | .removed-214123 :global(> .removed-214123-item) { : ^^^^^^^^^^^^^^^^^^^ @@ -1076,7 +1076,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__4' type=dynamic), raw: Atom('__styled-jsx-placeholder__4' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__4' type=dynamic), raw: "__styled-jsx-placeholder__4" } ,-[$DIR/tests/recovery/styled-jsx/1/input.css:22:9] 22 | flex-basis: __styled-jsx-placeholder__4%; : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/styled-jsx/2/span.rust-debug b/crates/swc_css_parser/tests/recovery/styled-jsx/2/span.rust-debug index 2aa22001d3e1..00784790c864 100644 --- a/crates/swc_css_parser/tests/recovery/styled-jsx/2/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/styled-jsx/2/span.rust-debug @@ -104,7 +104,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/styled-jsx/2/input.css:1:1] 1 | .a :global(> .b) { : ^ @@ -128,7 +128,7 @@ : ^ `---- - x Ident { value: Atom('b' type=static), raw: Atom('b' type=static) } + x Ident { value: Atom('b' type=static), raw: "b" } ,-[$DIR/tests/recovery/styled-jsx/2/input.css:1:1] 1 | .a :global(> .b) { : ^ @@ -183,7 +183,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__0' type=dynamic), raw: Atom('__styled-jsx-placeholder__0' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__0' type=dynamic), raw: "__styled-jsx-placeholder__0" } ,-[$DIR/tests/recovery/styled-jsx/2/input.css:2:5] 2 | flex-basis: __styled-jsx-placeholder__0%; : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/unicode-range/span.rust-debug b/crates/swc_css_parser/tests/recovery/unicode-range/span.rust-debug index da0c77eb0ba9..9ac25759bd31 100644 --- a/crates/swc_css_parser/tests/recovery/unicode-range/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/unicode-range/span.rust-debug @@ -109,7 +109,7 @@ : ^ `---- - x Ident { value: Atom('U' type=inline), raw: Atom('U' type=inline) } + x Ident { value: Atom('U' type=inline), raw: "U" } ,-[$DIR/tests/recovery/unicode-range/input.css:2:5] 2 | unicode-range: U+1Z1ee1-FFFFFF; : ^ @@ -121,7 +121,7 @@ : ^^^^^^^^^^^^^^ `---- - x Dimension { value: 1.0, raw_value: Atom('+1' type=inline), unit: Atom('Z1ee1-FFFFFF' type=dynamic), raw_unit: Atom('Z1ee1-FFFFFF' type=dynamic), type_flag: Integer } + x Dimension { value: 1.0, raw_value: "+1", unit: Atom('Z1ee1-FFFFFF' type=dynamic), raw_unit: "Z1ee1-FFFFFF", type_flag: Integer } ,-[$DIR/tests/recovery/unicode-range/input.css:2:5] 2 | unicode-range: U+1Z1ee1-FFFFFF; : ^^^^^^^^^^^^^^ @@ -163,7 +163,7 @@ : ^ `---- - x Ident { value: Atom('U' type=inline), raw: Atom('U' type=inline) } + x Ident { value: Atom('U' type=inline), raw: "U" } ,-[$DIR/tests/recovery/unicode-range/input.css:3:5] 3 | unicode-range: U+1e1ee1-FFZFFF; : ^ @@ -175,7 +175,7 @@ : ^^^^^^^^^^^^^^ `---- - x Dimension { value: 10.0, raw_value: Atom('+1e1' type=inline), unit: Atom('ee1-FFZFFF' type=dynamic), raw_unit: Atom('ee1-FFZFFF' type=dynamic), type_flag: Number } + x Dimension { value: 10.0, raw_value: "+1e1", unit: Atom('ee1-FFZFFF' type=dynamic), raw_unit: "ee1-FFZFFF", type_flag: Number } ,-[$DIR/tests/recovery/unicode-range/input.css:3:5] 3 | unicode-range: U+1e1ee1-FFZFFF; : ^^^^^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/1/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/1/span.rust-debug index 8ab58ffc3f8e..76a1eae737bb 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/1/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/1/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^^^ `---- - x AtKeyword { value: Atom('x,' type=inline), raw: Atom('x\2c ' type=inline) } + x AtKeyword { value: Atom('x,' type=inline), raw: "x\\2c " } ,-[$DIR/tests/recovery/value/at-keyword/1/input.css:1:1] 1 | a { value: @x\2c } : ^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/2/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/2/span.rust-debug index 529ef82e51b3..5d93116ba2ff 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/2/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/2/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^ `---- - x AtKeyword { value: Atom(',x' type=inline), raw: Atom('\,x' type=inline) } + x AtKeyword { value: Atom(',x' type=inline), raw: "\\,x" } ,-[$DIR/tests/recovery/value/at-keyword/2/input.css:1:1] 1 | a { value: @\,x } : ^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/3/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/3/span.rust-debug index 802d8e378287..3330e41ac38a 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/3/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/3/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^^^^^^^ `---- - x AtKeyword { value: Atom('keyword' type=inline), raw: Atom('k\65yword' type=dynamic) } + x AtKeyword { value: Atom('keyword' type=inline), raw: "k\\65yword" } ,-[$DIR/tests/recovery/value/at-keyword/3/input.css:1:1] 1 | a { value: @k\65yword } : ^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/4/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/4/span.rust-debug index 22c7123119bb..998465d6b6f8 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/4/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/4/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^^ `---- - x AtKeyword { value: Atom(',x' type=inline), raw: Atom('\2cx' type=inline) } + x AtKeyword { value: Atom(',x' type=inline), raw: "\\2cx" } ,-[$DIR/tests/recovery/value/at-keyword/4/input.css:1:1] 1 | a { value: @\2cx } : ^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/5/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/5/span.rust-debug index c21d1dd91633..82528274820b 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/5/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/5/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^ `---- - x AtKeyword { value: Atom('x,' type=inline), raw: Atom('x\,' type=inline) } + x AtKeyword { value: Atom('x,' type=inline), raw: "x\\," } ,-[$DIR/tests/recovery/value/at-keyword/5/input.css:1:1] 1 | a { value: @x\, } : ^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/6/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/6/span.rust-debug index b4a3ba59e609..a25308b078da 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/6/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/6/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^^^^^^^ `---- - x AtKeyword { value: Atom('ھyword' type=inline), raw: Atom('\6beyword' type=dynamic) } + x AtKeyword { value: Atom('ھyword' type=inline), raw: "\\6beyword" } ,-[$DIR/tests/recovery/value/at-keyword/6/input.css:1:1] 1 | a { value: @\6beyword } : ^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/at-keyword/7/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/at-keyword/7/span.rust-debug index 79baccd3c571..242c59d431f6 100644 --- a/crates/swc_css_parser/tests/recovery/value/at-keyword/7/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/at-keyword/7/span.rust-debug @@ -107,7 +107,7 @@ : ^^^^^^^^^^^ `---- - x AtKeyword { value: Atom('keyword' type=inline), raw: Atom('\6b eyword' type=dynamic) } + x AtKeyword { value: Atom('keyword' type=inline), raw: "\\6b eyword" } ,-[$DIR/tests/recovery/value/at-keyword/7/input.css:1:1] 1 | a { value: @\6b eyword } : ^^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/custom-properties/exclamation/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/custom-properties/exclamation/span.rust-debug index ff74ec0138d1..7fc8509115dc 100644 --- a/crates/swc_css_parser/tests/recovery/value/custom-properties/exclamation/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/custom-properties/exclamation/span.rust-debug @@ -570,7 +570,7 @@ : ^^^ `---- - x Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + x Ident { value: Atom('bar' type=inline), raw: "bar" } ,-[$DIR/tests/recovery/value/custom-properties/exclamation/input.css:15:5] 15 | --foo: bar; : ^^^ @@ -678,7 +678,7 @@ : ^^^ `---- - x Ident { value: Atom('bar' type=inline), raw: Atom('bar' type=inline) } + x Ident { value: Atom('bar' type=inline), raw: "bar" } ,-[$DIR/tests/recovery/value/custom-properties/exclamation/input.css:19:5] 19 | --foo: bar; : ^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/custom-properties/only-dashed/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/custom-properties/only-dashed/span.rust-debug index 53bdb94fd1ea..a86635206a28 100644 --- a/crates/swc_css_parser/tests/recovery/value/custom-properties/only-dashed/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/custom-properties/only-dashed/span.rust-debug @@ -91,7 +91,7 @@ : ^^ `---- - x Ident { value: Atom('--' type=inline), raw: Atom('--' type=inline) } + x Ident { value: Atom('--' type=inline), raw: "--" } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:2:5] 2 | --:value; : ^^ @@ -115,7 +115,7 @@ : ^^^^^ `---- - x Ident { value: Atom('value' type=inline), raw: Atom('value' type=inline) } + x Ident { value: Atom('value' type=inline), raw: "value" } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:2:5] 2 | --:value; : ^^^^^ @@ -232,7 +232,7 @@ : ^^ `---- - x Ident { value: Atom('--' type=inline), raw: Atom('--' type=inline) } + x Ident { value: Atom('--' type=inline), raw: "--" } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:6:5] 6 | counter-reset: -- --a -a; : ^^ @@ -244,7 +244,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:6:5] 6 | counter-reset: -- --a -a; : ^ @@ -256,7 +256,7 @@ : ^^^ `---- - x Ident { value: Atom('--a' type=inline), raw: Atom('--a' type=inline) } + x Ident { value: Atom('--a' type=inline), raw: "--a" } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:6:5] 6 | counter-reset: -- --a -a; : ^^^ @@ -268,7 +268,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:6:5] 6 | counter-reset: -- --a -a; : ^ @@ -280,7 +280,7 @@ : ^^ `---- - x Ident { value: Atom('-a' type=inline), raw: Atom('-a' type=inline) } + x Ident { value: Atom('-a' type=inline), raw: "-a" } ,-[$DIR/tests/recovery/value/custom-properties/only-dashed/input.css:6:5] 6 | counter-reset: -- --a -a; : ^^ diff --git a/crates/swc_css_parser/tests/recovery/value/number/dot/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/number/dot/span.rust-debug index 434db69623bb..5e42b576f76e 100644 --- a/crates/swc_css_parser/tests/recovery/value/number/dot/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/number/dot/span.rust-debug @@ -107,7 +107,7 @@ : ^ `---- - x Number { value: 0.0, raw: Atom('0' type=inline), type_flag: Integer } + x Number { value: 0.0, raw: "0", type_flag: Integer } ,-[$DIR/tests/recovery/value/number/dot/input.css:1:1] 1 | a { width: 0.; } : ^ diff --git a/crates/swc_css_parser/tests/recovery/value/number/minus-dot/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/number/minus-dot/span.rust-debug index 34c0005bb677..0e1ef0d1d19e 100644 --- a/crates/swc_css_parser/tests/recovery/value/number/minus-dot/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/number/minus-dot/span.rust-debug @@ -107,7 +107,7 @@ : ^^ `---- - x Number { value: -0.0, raw: Atom('-0' type=inline), type_flag: Integer } + x Number { value: -0.0, raw: "-0", type_flag: Integer } ,-[$DIR/tests/recovery/value/number/minus-dot/input.css:1:1] 1 | a { width: -0.; } : ^^ diff --git a/crates/swc_css_parser/tests/recovery/value/number/plus-dot/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/number/plus-dot/span.rust-debug index f11798ab3591..aafa9163af9e 100644 --- a/crates/swc_css_parser/tests/recovery/value/number/plus-dot/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/number/plus-dot/span.rust-debug @@ -107,7 +107,7 @@ : ^^ `---- - x Number { value: 0.0, raw: Atom('+0' type=inline), type_flag: Integer } + x Number { value: 0.0, raw: "+0", type_flag: Integer } ,-[$DIR/tests/recovery/value/number/plus-dot/input.css:1:1] 1 | a { width: +0.; } : ^^ diff --git a/crates/swc_css_parser/tests/recovery/value/percentage/dot/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/percentage/dot/span.rust-debug index 52b9beebc8ff..1f552c700226 100644 --- a/crates/swc_css_parser/tests/recovery/value/percentage/dot/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/percentage/dot/span.rust-debug @@ -107,7 +107,7 @@ : ^ `---- - x Number { value: 0.0, raw: Atom('0' type=inline), type_flag: Integer } + x Number { value: 0.0, raw: "0", type_flag: Integer } ,-[$DIR/tests/recovery/value/percentage/dot/input.css:1:1] 1 | a { width: 0.%; } : ^ diff --git a/crates/swc_css_parser/tests/recovery/value/percentage/minus/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/percentage/minus/span.rust-debug index 7c60f8752349..5312091e9c1e 100644 --- a/crates/swc_css_parser/tests/recovery/value/percentage/minus/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/percentage/minus/span.rust-debug @@ -107,7 +107,7 @@ : ^^ `---- - x Number { value: -0.0, raw: Atom('-0' type=inline), type_flag: Integer } + x Number { value: -0.0, raw: "-0", type_flag: Integer } ,-[$DIR/tests/recovery/value/percentage/minus/input.css:1:1] 1 | a { width: -0.%; } : ^^ diff --git a/crates/swc_css_parser/tests/recovery/value/percentage/plus/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/percentage/plus/span.rust-debug index 04c969c2cbb4..c9399608a9a2 100644 --- a/crates/swc_css_parser/tests/recovery/value/percentage/plus/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/percentage/plus/span.rust-debug @@ -107,7 +107,7 @@ : ^^ `---- - x Number { value: 0.0, raw: Atom('+0' type=inline), type_flag: Integer } + x Number { value: 0.0, raw: "+0", type_flag: Integer } ,-[$DIR/tests/recovery/value/percentage/plus/input.css:1:1] 1 | a { width: +0.%; } : ^^ diff --git a/crates/swc_css_parser/tests/recovery/value/quotes/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/quotes/span.rust-debug index 523ba2304433..3a8ee79ee52d 100644 --- a/crates/swc_css_parser/tests/recovery/value/quotes/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/quotes/span.rust-debug @@ -136,7 +136,7 @@ : ^^^^ `---- - x BadString { raw_value: Atom('"tes' type=inline) } + x BadString { raw_value: "\"tes" } ,-[$DIR/tests/recovery/value/quotes/input.css:2:5] 2 | content: "tes : ^^^^ @@ -148,8 +148,7 @@ 3 | `-> t"; `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/value/quotes/input.css:2:5] 2 | ,-> content: "tes 3 | `-> t"; @@ -161,7 +160,7 @@ : ^ `---- - x Ident { value: Atom('t' type=inline), raw: Atom('t' type=inline) } + x Ident { value: Atom('t' type=inline), raw: "t" } ,-[$DIR/tests/recovery/value/quotes/input.css:3:5] 3 | t"; : ^ @@ -173,7 +172,7 @@ : ^^ `---- - x BadString { raw_value: Atom('";' type=inline) } + x BadString { raw_value: "\";" } ,-[$DIR/tests/recovery/value/quotes/input.css:3:5] 3 | t"; : ^^ diff --git a/crates/swc_css_parser/tests/recovery/value/string/newline/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/string/newline/span.rust-debug index cdb55c76d4c9..f6effb5202e4 100644 --- a/crates/swc_css_parser/tests/recovery/value/string/newline/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/string/newline/span.rust-debug @@ -107,7 +107,7 @@ : ^ `---- - x BadString { raw_value: Atom('"' type=inline) } + x BadString { raw_value: "\"" } ,-[$DIR/tests/recovery/value/string/newline/input.css:2:5] 2 | prop: " : ^ diff --git a/crates/swc_css_parser/tests/recovery/value/url/basic/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/url/basic/span.rust-debug index 8a3ab2d48885..787954c50575 100644 --- a/crates/swc_css_parser/tests/recovery/value/url/basic/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/url/basic/span.rust-debug @@ -147,7 +147,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x String { value: Atom('http://www.example.com/pinkish.gif' type=dynamic), raw: Atom('"http://www.example.com/pinkish.gif"' type=dynamic) } + x String { value: Atom('http://www.example.com/pinkish.gif' type=dynamic), raw: "\"http://www.example.com/pinkish.gif\"" } ,-[$DIR/tests/recovery/value/url/basic/input.css:2:5] 2 | --foo: "http://www.example.com/pinkish.gif"; : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -189,7 +189,7 @@ : ^^^^^^^^^^^^^^ `---- - x BadUrl { name: Atom('url' type=static), raw_name: Atom('url' type=static), raw_value: Atom('var(--foo' type=dynamic) } + x BadUrl { name: Atom('url' type=static), raw_name: "url", raw_value: "var(--foo" } ,-[$DIR/tests/recovery/value/url/basic/input.css:3:5] 3 | background: url(var(--foo)); : ^^^^^^^^^^^^^^ @@ -648,7 +648,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x BadUrl { name: Atom('url' type=static), raw_name: Atom('url' type=static), raw_value: Atom('image.png param(var(--url' type=dynamic) } + x BadUrl { name: Atom('url' type=static), raw_name: "url", raw_value: "image.png param(var(--url" } ,-[$DIR/tests/recovery/value/url/basic/input.css:13:5] 13 | background: url(image.png param(var(--url))); : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -795,7 +795,7 @@ : ^^^^^ `---- - x String { value: Atom('foo' type=inline), raw: Atom('"foo"' type=inline) } + x String { value: Atom('foo' type=inline), raw: "\"foo\"" } ,-[$DIR/tests/recovery/value/url/basic/input.css:17:5] 17 | background: url("foo", "bar"); : ^^^^^ @@ -819,7 +819,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/value/url/basic/input.css:17:5] 17 | background: url("foo", "bar"); : ^ @@ -831,7 +831,7 @@ : ^^^^^ `---- - x String { value: Atom('bar' type=inline), raw: Atom('"bar"' type=inline) } + x String { value: Atom('bar' type=inline), raw: "\"bar\"" } ,-[$DIR/tests/recovery/value/url/basic/input.css:17:5] 17 | background: url("foo", "bar"); : ^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/value/url/parenthesis/span.rust-debug b/crates/swc_css_parser/tests/recovery/value/url/parenthesis/span.rust-debug index beb9356ce3b1..87ef5ca62fde 100644 --- a/crates/swc_css_parser/tests/recovery/value/url/parenthesis/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/value/url/parenthesis/span.rust-debug @@ -111,8 +111,7 @@ 3 | `-> } `---- - x BadUrl { name: Atom('url' type=static), raw_name: Atom('url' type=static), raw_value: Atom('test\); - | }' type=dynamic) } + x BadUrl { name: Atom('url' type=static), raw_name: "url", raw_value: "test\\);\n}" } ,-[$DIR/tests/recovery/value/url/parenthesis/input.css:2:5] 2 | ,-> background: url(test\); 3 | `-> } diff --git a/crates/swc_css_parser/tests/recovery/vercel/001/span.rust-debug b/crates/swc_css_parser/tests/recovery/vercel/001/span.rust-debug index b0d3733bbcfe..fbfa1e955114 100644 --- a/crates/swc_css_parser/tests/recovery/vercel/001/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/vercel/001/span.rust-debug @@ -814,7 +814,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__7' type=dynamic), raw: Atom('__styled-jsx-placeholder__7' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__7' type=dynamic), raw: "__styled-jsx-placeholder__7" } ,-[$DIR/tests/recovery/vercel/001/input.css:14:5] 14 | __styled-jsx-placeholder__7 : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -827,8 +827,7 @@ 15 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/vercel/001/input.css:14:5] 14 | __styled-jsx-placeholder__7 : ^ diff --git a/crates/swc_css_parser/tests/recovery/vercel/002/span.rust-debug b/crates/swc_css_parser/tests/recovery/vercel/002/span.rust-debug index c9e127d8a29f..a7b82c00cd73 100644 --- a/crates/swc_css_parser/tests/recovery/vercel/002/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/vercel/002/span.rust-debug @@ -255,7 +255,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__7vw' type=dynamic), raw: Atom('__styled-jsx-placeholder__7vw' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__7vw' type=dynamic), raw: "__styled-jsx-placeholder__7vw" } ,-[$DIR/tests/recovery/vercel/002/input.css:4:5] 4 | margin: 0 calc(__styled-jsx-placeholder__7vw - __styled-jsx-placeholder__7px); : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -267,7 +267,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/vercel/002/input.css:4:5] 4 | margin: 0 calc(__styled-jsx-placeholder__7vw - __styled-jsx-placeholder__7px); : ^ @@ -291,7 +291,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/vercel/002/input.css:4:5] 4 | margin: 0 calc(__styled-jsx-placeholder__7vw - __styled-jsx-placeholder__7px); : ^ @@ -303,7 +303,7 @@ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('__styled-jsx-placeholder__7px' type=dynamic), raw: Atom('__styled-jsx-placeholder__7px' type=dynamic) } + x Ident { value: Atom('__styled-jsx-placeholder__7px' type=dynamic), raw: "__styled-jsx-placeholder__7px" } ,-[$DIR/tests/recovery/vercel/002/input.css:4:5] 4 | margin: 0 calc(__styled-jsx-placeholder__7vw - __styled-jsx-placeholder__7px); : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/vercel/003/span.rust-debug b/crates/swc_css_parser/tests/recovery/vercel/003/span.rust-debug index 506e0363264d..5428c4fd88b0 100644 --- a/crates/swc_css_parser/tests/recovery/vercel/003/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/vercel/003/span.rust-debug @@ -359,7 +359,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/vercel/003/input.css:7:1] 7 | .geist-list :global(> .geist-list-item) { : ^ @@ -383,7 +383,7 @@ : ^^^^^^^^^^^^^^^ `---- - x Ident { value: Atom('geist-list-item' type=dynamic), raw: Atom('geist-list-item' type=dynamic) } + x Ident { value: Atom('geist-list-item' type=dynamic), raw: "geist-list-item" } ,-[$DIR/tests/recovery/vercel/003/input.css:7:1] 7 | .geist-list :global(> .geist-list-item) { : ^^^^^^^^^^^^^^^ @@ -525,7 +525,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/003/input.css:10:5] 10 | flex-basis: __ident__%; : ^^^^^^^^^ diff --git a/crates/swc_css_parser/tests/recovery/vercel/004/span.rust-debug b/crates/swc_css_parser/tests/recovery/vercel/004/span.rust-debug index 7778a128661e..48d01c38ffbc 100644 --- a/crates/swc_css_parser/tests/recovery/vercel/004/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/vercel/004/span.rust-debug @@ -177,7 +177,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/004/input.css:3:5] 3 | __ident__ : ^^^^^^^^^ @@ -189,8 +189,7 @@ 4 | `-> border-radius: 7px; `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/vercel/004/input.css:3:5] 3 | ,-> __ident__ 4 | `-> border-radius: 7px; @@ -202,7 +201,7 @@ : ^^^^^^^^^^^^^ `---- - x Ident { value: Atom('border-radius' type=dynamic), raw: Atom('border-radius' type=dynamic) } + x Ident { value: Atom('border-radius' type=dynamic), raw: "border-radius" } ,-[$DIR/tests/recovery/vercel/004/input.css:4:5] 4 | border-radius: 7px; : ^^^^^^^^^^^^^ @@ -226,7 +225,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/vercel/004/input.css:4:5] 4 | border-radius: 7px; : ^ @@ -238,7 +237,7 @@ : ^^^ `---- - x Dimension { value: 7.0, raw_value: Atom('7' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 7.0, raw_value: "7", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/vercel/004/input.css:4:5] 4 | border-radius: 7px; : ^^^ @@ -360,7 +359,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/004/input.css:7:5] 7 | __ident__ : ^^^^^^^^^ @@ -372,8 +371,7 @@ 8 | `-> __ident__ `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/vercel/004/input.css:7:5] 7 | ,-> __ident__ 8 | `-> __ident__ @@ -385,7 +383,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/004/input.css:8:5] 8 | __ident__ : ^^^^^^^^^ @@ -398,8 +396,7 @@ 9 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/vercel/004/input.css:8:5] 8 | __ident__ : ^ diff --git a/crates/swc_css_parser/tests/recovery/vercel/005/span.rust-debug b/crates/swc_css_parser/tests/recovery/vercel/005/span.rust-debug index 7d4c0d2bf526..b91d207eb7e4 100644 --- a/crates/swc_css_parser/tests/recovery/vercel/005/span.rust-debug +++ b/crates/swc_css_parser/tests/recovery/vercel/005/span.rust-debug @@ -117,7 +117,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/005/input.css:3:5] 3 | __ident__ : ^^^^^^^^^ @@ -129,8 +129,7 @@ 4 | `-> border-radius: 7px; `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/vercel/005/input.css:3:5] 3 | ,-> __ident__ 4 | `-> border-radius: 7px; @@ -142,7 +141,7 @@ : ^^^^^^^^^^^^^ `---- - x Ident { value: Atom('border-radius' type=dynamic), raw: Atom('border-radius' type=dynamic) } + x Ident { value: Atom('border-radius' type=dynamic), raw: "border-radius" } ,-[$DIR/tests/recovery/vercel/005/input.css:4:5] 4 | border-radius: 7px; : ^^^^^^^^^^^^^ @@ -166,7 +165,7 @@ : ^ `---- - x WhiteSpace { value: Atom(' ' type=inline) } + x WhiteSpace { value: " " } ,-[$DIR/tests/recovery/vercel/005/input.css:4:5] 4 | border-radius: 7px; : ^ @@ -178,7 +177,7 @@ : ^^^ `---- - x Dimension { value: 7.0, raw_value: Atom('7' type=inline), unit: Atom('px' type=static), raw_unit: Atom('px' type=static), type_flag: Integer } + x Dimension { value: 7.0, raw_value: "7", unit: Atom('px' type=static), raw_unit: "px", type_flag: Integer } ,-[$DIR/tests/recovery/vercel/005/input.css:4:5] 4 | border-radius: 7px; : ^^^ @@ -281,7 +280,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/005/input.css:7:5] 7 | __ident__ : ^^^^^^^^^ @@ -293,8 +292,7 @@ 8 | `-> __ident__ `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n " } ,-[$DIR/tests/recovery/vercel/005/input.css:7:5] 7 | ,-> __ident__ 8 | `-> __ident__ @@ -306,7 +304,7 @@ : ^^^^^^^^^ `---- - x Ident { value: Atom('__ident__' type=dynamic), raw: Atom('__ident__' type=dynamic) } + x Ident { value: Atom('__ident__' type=dynamic), raw: "__ident__" } ,-[$DIR/tests/recovery/vercel/005/input.css:8:5] 8 | __ident__ : ^^^^^^^^^ @@ -319,8 +317,7 @@ 9 | } `---- - x WhiteSpace { value: Atom(' - | ' type=inline) } + x WhiteSpace { value: "\n" } ,-[$DIR/tests/recovery/vercel/005/input.css:8:5] 8 | __ident__ : ^ diff --git a/crates/swc_css_visit/src/lib.rs b/crates/swc_css_visit/src/lib.rs index 6818cdec7dc2..29f8b224d423 100644 --- a/crates/swc_css_visit/src/lib.rs +++ b/crates/swc_css_visit/src/lib.rs @@ -2,7 +2,7 @@ #![deny(clippy::all)] #![allow(clippy::ptr_arg)] -use swc_atoms::JsWord; +use swc_atoms::{Atom, JsWord}; use swc_common::Span; use swc_css_ast::*; use swc_visit::define; @@ -58,43 +58,43 @@ define!({ pub struct Ident { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct CustomIdent { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct CustomPropertyName { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct DashedIdent { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct Str { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct Integer { pub span: Span, pub value: i64, - pub raw: Option, + pub raw: Option, } pub struct Number { pub span: Span, pub value: f64, - pub raw: Option, + pub raw: Option, } pub struct Declaration { @@ -171,7 +171,7 @@ define!({ pub struct HexColor { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub enum AlphaValue { @@ -288,7 +288,7 @@ define!({ pub struct UrlValueRaw { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub enum UrlModifier { @@ -521,9 +521,9 @@ define!({ pub struct AnPlusBNotation { pub span: Span, pub a: Option, - pub a_raw: Option, + pub a_raw: Option, pub b: Option, - pub b_raw: Option, + pub b_raw: Option, } pub struct PseudoElementSelector { @@ -542,7 +542,7 @@ define!({ pub struct CustomHighlightName { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct IdSelector { @@ -993,7 +993,7 @@ define!({ pub struct ExtensionName { pub span: Span, pub value: JsWord, - pub raw: Option, + pub raw: Option, } pub struct CustomMediaQuery {