{"record":{"id":"c434a7a0bee58fa9","repo":"swc-project/swc","slug":"expected-dimension-number-or-delim-token","errorCode":null,"errorMessage":"Expected dimension, number or '?' delim token","messagePattern":"Expected dimension, number or '\\?' delim token","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":2879,"sourceCode":"                unicode_range.push_str(&raw.1);\n\n                loop {\n                    if !is!(self, \"?\") {\n                        break;\n                    }\n\n                    let question = match bump!(self) {\n                        Token::Delim { value } => value,\n                        _ => {\n                            unreachable!();\n                        }\n                    };\n\n                    unicode_range.push(question);\n                }\n            }\n            _ => {\n                return Err(Error::new(\n                    span,\n                    ErrorKind::Expected(\"dimension, number or '?' delim token\"),\n                ));\n            }\n        }\n\n        let mut chars = unicode_range.chars();\n\n        // 1. Skipping the first u token, concatenate the representations of all the\n        // tokens in the production together. Let this be text.\n        chars.next();\n\n        // 2. If the first character of text is U+002B PLUS SIGN, consume it. Otherwise,\n        // this is an invalid <urange>, and this algorithm must exit.\n        let mut next = chars.next();\n\n        if next != Some('+') {\n            return Err(Error::new(","sourceCodeStart":2861,"sourceCodeEnd":2897,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L2861-L2897","documentation":"Fired while parsing a UnicodeRange: after the leading `u`, the parser expected a dimension token (hex digits with `+` unit) or a number, or a `?` delim for wildcard forms, and found none of them. Input at fault is a malformed @unicode-range value such as `U+` with nothing following, or other tokens that do not fit any Unicode range production.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:2879 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Follow 'U' with '+', hex digits, or '?' wildcards: 'U+4??'","Remove invalid tokens after the leading U"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}