{"record":{"id":"7f18f4000903cc1e","repo":"swc-project/swc","slug":"expected-ident-token-7f18f4","errorCode":null,"errorMessage":"Expected ident token","messagePattern":"Expected ident token","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/selectors/mod.rs","lineNumber":1435,"sourceCode":"                    b_raw,\n                }))\n            }\n            _ => {\n                return Err(Error::new(span, ErrorKind::InvalidAnPlusBMicrosyntax));\n            }\n        }\n    }\n}\n\nimpl<I> Parse<CustomHighlightName> for Parser<I>\nwhere\n    I: ParserInput,\n{\n    fn parse(&mut self) -> PResult<CustomHighlightName> {\n        let span = self.input.cur_span();\n\n        if !is!(self, Ident) {\n            return Err(Error::new(span, ErrorKind::Expected(\"ident token\")));\n        }\n\n        match bump!(self) {\n            Token::Ident { value, raw, .. } => Ok(CustomHighlightName {\n                span,\n                value,\n                raw: Some(raw),\n            }),\n            _ => {\n                unreachable!()\n            }\n        }\n    }\n}\n","sourceCodeStart":1417,"sourceCodeEnd":1450,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/selectors/mod.rs#L1417-L1450","documentation":"Fired while parsing a CustomHighlightName (::highlight() name): the current token was not an Ident, so no valid custom highlight name could be read. The check `if !is!(self, Ident)` is a validation guard; input at fault is `::highlight()` or `::highlight(2foo)` where the argument is not an ident.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/selectors/mod.rs:1435 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an ident as the ::highlight name","Report the collected error","Fix the selector"],"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"}