{"record":{"id":"72504363cac9a80f","repo":"swc-project/swc","slug":"expected-ident-or-function-local-or-scope-token","errorCode":null,"errorMessage":"Expected ident or function (local or scope) token","messagePattern":"Expected ident or function \\(local or scope\\) token","errorType":"validation","errorClass":"swc_css_parser::Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/at_rules/mod.rs","lineNumber":883,"sourceCode":"                    {\n                        let pseudo = self.parse()?;\n\n                        self.input.skip_ws();\n\n                        let name = self.parse()?;\n\n                        Ok(KeyframesName::PseudoPrefix(Box::new(\n                            KeyframesPseudoPrefix {\n                                span: span!(self, span.lo),\n                                pseudo,\n                                name,\n                            },\n                        )))\n                    }\n                    _ => {\n                        let span = self.input.cur_span();\n\n                        Err(Error::new(\n                            span,\n                            ErrorKind::Expected(\"ident or function (local or scope) token\"),\n                        ))\n                    }\n                }\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            }","sourceCodeStart":865,"sourceCodeEnd":901,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/at_rules/mod.rs#L865-L901","documentation":"While parsing an at-rule name/prelude position, the parser found a token that is neither an ident nor the expected function form, so it reports this error at the current span. The source does not match the expected name grammar at that position.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/at_rules/mod.rs:883 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write the name using an ident or the expected function form","Report the error from the parse result","Fix the CSS around the at-rule"],"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"}