{"record":{"id":"c8f1df95e355b832","repo":"swc-project/swc","slug":"unexpected","errorCode":null,"errorMessage":"Unexpected ","messagePattern":"Unexpected ","errorType":"validation","errorClass":"swc_css_parser::Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/at_rules/mod.rs","lineNumber":668,"sourceCode":"                BlockContentsGrammar::StyleBlock => {\n                    let style_blocks: Vec<StyleBlock> = self.parse()?;\n                    let style_blocks: Vec<ComponentValue> =\n                        style_blocks.into_iter().map(ComponentValue::from).collect();\n\n                    style_blocks\n                }\n                _ => {\n                    let rule_list = self.parse_as::<Vec<Rule>>()?;\n                    let rule_list: Vec<ComponentValue> =\n                        rule_list.into_iter().map(ComponentValue::from).collect();\n\n                    rule_list\n                }\n            },\n            \"namespace\" => {\n                let span = self.input.cur_span();\n\n                return Err(Error::new(span, ErrorKind::Unexpected(\"\")));\n            }\n            \"nest\" => {\n                let style_blocks: Vec<StyleBlock> = self.parse()?;\n                let style_blocks: Vec<ComponentValue> =\n                    style_blocks.into_iter().map(ComponentValue::from).collect();\n\n                style_blocks\n            }\n            \"page\" => {\n                let declaration_list = self\n                    .with_ctx(Ctx {\n                        in_page_at_rule: true,\n                        ..self.ctx\n                    })\n                    .parse_as::<Vec<DeclarationOrAtRule>>()?;\n                let declaration_list: Vec<ComponentValue> = declaration_list\n                    .into_iter()\n                    .map(ComponentValue::from)","sourceCodeStart":650,"sourceCodeEnd":686,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/at_rules/mod.rs#L650-L686","documentation":"parse_at_rule_block hit an ErrorKind::Unexpected(...) arm with no handler for the current block-contents grammar, so the unexpected token text is reported. It means the CSS inside this at-rule block cannot be classified by the active grammar (rule list vs style block).","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/at_rules/mod.rs:668 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the Unexpected payload to find the offending token","Fix the CSS around the at-rule block","Extend parse_at_rule_block for the missing grammar combination"],"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"}