{"record":{"id":"80b4652373822ed6","repo":"swc-project/swc","slug":"expected-ident-80b465","errorCode":null,"errorMessage":"Expected Ident","messagePattern":"Expected Ident","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":1829,"sourceCode":"                value,\n                raw: Some(raw),\n            }),\n            _ => {\n                unreachable!()\n            }\n        }\n    }\n}\n\nimpl<I> Parse<CustomIdent> for Parser<I>\nwhere\n    I: ParserInput,\n{\n    fn parse(&mut self) -> PResult<CustomIdent> {\n        let span = self.input.cur_span();\n\n        if !is!(self, Ident) {\n            return Err(Error::new(span, ErrorKind::Expected(\"Ident\")));\n        }\n\n        match bump!(self) {\n            Token::Ident { value, raw, .. } => {\n                if matches_eq_ignore_ascii_case!(\n                    value, \"initial\", \"inherit\", \"unset\", \"revert\", \"default\"\n                ) {\n                    return Err(Error::new(span, ErrorKind::InvalidCustomIdent(value)));\n                }\n\n                Ok(CustomIdent {\n                    span,\n                    value,\n                    raw: Some(raw),\n                })\n            }\n            _ => {\n                unreachable!()","sourceCodeStart":1811,"sourceCodeEnd":1847,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L1811-L1847","documentation":"Fired while parsing a CustomIdent: the current token was not an Ident, so no CSS-wide-keyword-excluded custom identifier could be produced. The `if !is!(self, Ident)` check is a validation guard; input at fault is a context expecting a custom ident (e.g. a counter style name, keyframes name) that receives a number, string, or other token.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:1829 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide an identifier token where a custom ident is expected","Quote strings explicitly if a string was intended"],"exampleFix":null,"handlingStrategy":"type-guard","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"}