{"record":{"id":"0d4ed3dd1fe7911e","repo":"swc-project/swc","slug":"expected-u-ident-token","errorCode":null,"errorMessage":"Expected 'u' ident token","messagePattern":"Expected 'u' ident token","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":2715,"sourceCode":"{\n    fn parse(&mut self) -> PResult<UnicodeRange> {\n        let span = self.input.cur_span();\n        let mut unicode_range = String::new();\n\n        // should start with `u` or `U`\n        match cur!(self) {\n            Token::Ident { value, .. } if matches_eq_ignore_ascii_case!(value, \"u\") => {\n                let u = match bump!(self) {\n                    Token::Ident { value, .. } => value,\n                    _ => {\n                        unreachable!();\n                    }\n                };\n\n                unicode_range.push_str(&u);\n            }\n            _ => {\n                return Err(Error::new(span, ErrorKind::Expected(\"'u' ident token\")));\n            }\n        };\n\n        match cur!(self) {\n            // u '+' <ident-token> '?'*\n            // u '+' '?'+\n            Token::Delim { value } if *value == '+' => {\n                let plus = match bump!(self) {\n                    Token::Delim { value } => value,\n                    _ => {\n                        unreachable!();\n                    }\n                };\n\n                unicode_range.push(plus);\n\n                if is!(self, Ident) {\n                    let ident = match bump!(self) {","sourceCodeStart":2697,"sourceCodeEnd":2733,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L2697-L2733","documentation":"Fired while parsing a UnicodeRange: the range must begin with the ident `u`/`U` (as in U+0-7F), but the current token was not that ident. This match-with-fallback is a validation guard; input at fault is a @unicode-range value that does not start with `u`/`U`, e.g. a bare number or hex digits.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:2715 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start the range with 'U' or 'u', e.g. 'U+0-7F'","Check for typos in the unicode-range descriptor value"],"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-14T00:17:10.932Z"}