{"record":{"id":"3813a961b8711a20","repo":"swc-project/swc","slug":"expected-ident-or-string","errorCode":null,"errorMessage":"Expected ident or string","messagePattern":"Expected ident or string","errorType":"validation","errorClass":"swc_css_parser::Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/at_rules/mod.rs","lineNumber":906,"sourceCode":"                }\n            }\n            tok!(\"ident\") => {\n                let custom_ident: CustomIdent = self.parse()?;\n\n                if matches_eq_ignore_ascii_case!(custom_ident.value, \"none\") {\n                    return Err(Error::new(\n                        custom_ident.span,\n                        ErrorKind::InvalidCustomIdent(custom_ident.value),\n                    ));\n                }\n\n                Ok(KeyframesName::CustomIdent(Box::new(custom_ident)))\n            }\n            tok!(\"string\") => Ok(KeyframesName::Str(Box::new(self.parse()?))),\n            _ => {\n                let span = self.input.cur_span();\n\n                Err(Error::new(span, ErrorKind::Expected(\"ident or string\")))\n            }\n        }\n    }\n}\n\nimpl<I> Parse<KeyframeSelector> for Parser<I>\nwhere\n    I: ParserInput,\n{\n    fn parse(&mut self) -> PResult<KeyframeSelector> {\n        match cur!(self) {\n            tok!(\"ident\") => {\n                let ident: Ident = self.parse()?;\n                let lower = ident.value.to_ascii_lowercase();\n\n                if lower != \"from\" && lower != \"to\" {\n                    return Err(Error::new(\n                        ident.span,","sourceCodeStart":888,"sourceCodeEnd":924,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/at_rules/mod.rs#L888-L924","documentation":"Fired while parsing the name of a @keyframes at-rule: the current token was neither an ident nor a string, so no valid keyframes name (a <custom-ident> or a <string>) could be produced. Input at fault is @keyframes with a missing or malformed name, e.g. `@keyframes { ... }` or `@keyframes 2x { ... }`.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/at_rules/mod.rs:906 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Give @keyframes a valid ident or string name","Report the error from the parse result","Fix the CSS source"],"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"}