{"record":{"id":"0051447e6d036291","repo":"swc-project/swc","slug":"expected-whitespace-ident-or-eof","errorCode":null,"errorMessage":"Expected whitespace, ';', '@', ident or EOF","messagePattern":"Expected whitespace, ';', '@', ident or EOF","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/syntax/mod.rs","lineNumber":563,"sourceCode":"                                temporary_list.span = span!(self, span.lo);\n\n                                DeclarationOrAtRule::ListOfComponentValues(Box::new(temporary_list))\n                            }\n                        };\n\n                    declarations.push(decl_or_list_of_component_values);\n                }\n                // anything else\n                // This is a parse error. Reconsume the current input token. As long as the next\n                // input token is anything other than a <semicolon-token> or <EOF-token>, consume a\n                // component value and throw away the returned value.\n                //\n                // We don't throw away the return value because of the recovery mode and return list\n                // of components values in this case\n                _ => {\n                    let span = self.input.cur_span();\n\n                    self.errors.push(Error::new(\n                        span,\n                        ErrorKind::Expected(\"whitespace, ';', '@', ident or EOF\"),\n                    ));\n\n                    // For recovery mode\n                    let mut list_of_component_values = ListOfComponentValues {\n                        span: Default::default(),\n                        children: Vec::new(),\n                    };\n\n                    while !is_one_of!(self, \";\", EOF) {\n                        let component_value = self.parse_as::<ComponentValue>()?;\n\n                        list_of_component_values.children.push(component_value);\n                    }\n\n                    list_of_component_values.span = span!(self, span.lo);\n","sourceCodeStart":545,"sourceCodeEnd":581,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/syntax/mod.rs#L545-L581","documentation":"Fires in the declaration-or-at-rule parser when the current token cannot start a declaration or an at-rule. Per CSS Syntax Level 3, this is a parse error: the parser reconsumes the token and discards component values until a semicolon or EOF, recording this error so the invalid rule content is dropped rather than aborting the whole stylesheet.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/syntax/mod.rs:563 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Start declarations with a valid property ident or '@' for at-rules","Check for stray tokens (stray delimiters, unclosed strings) before the offending position","Remove or quote malformed content inside the rule block"],"exampleFix":null,"handlingStrategy":"fallback","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"}