{"record":{"id":"14f1127164fdb46b","repo":"swc-project/swc","slug":"expected-14f112","errorCode":null,"errorMessage":"Expected '{'","messagePattern":"Expected '\\{'","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/syntax/mod.rs","lineNumber":280,"sourceCode":"        loop {\n            // <EOF-token>\n            // This is a parse error. Return nothing.\n            if is!(self, EOF) {\n                return Err(Error::new(\n                    span!(self, span.lo),\n                    ErrorKind::EofButExpected(\"'{'\"),\n                ));\n            }\n\n            match cur!(self) {\n                // <semicolon-token>\n                // If mixed with declarations is true, this is a parse error; return nothing.\n                // Otherwise, append a <semicolon-token> to the qualified rule’s prelude.\n                tok!(\";\") => {\n                    if self.ctx.mixed_with_declarations {\n                        let span = self.input.cur_span();\n\n                        return Err(Error::new(span, ErrorKind::Expected(\"'{'\")));\n                    } else {\n                        let component_value = self.parse_as::<ComponentValue>()?;\n\n                        prelude.push(component_value);\n                    }\n                }\n                // <{-token>\n                // Consume a simple block and assign it to the qualified rule’s block. Return the\n                // qualified rule.\n                tok!(\"{\") => {\n                    let block = self.parse_as::<SimpleBlock>()?;\n                    let mut qualified_rule = QualifiedRule {\n                        span: span!(self, span.lo),\n                        prelude: QualifiedRulePrelude::ListOfComponentValues(\n                            self.create_locv(prelude),\n                        ),\n                        block,\n                    };","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/syntax/mod.rs#L262-L298","documentation":"Same qualified-rule path as the EOF case: the input ended where the `{` starting the rule block is required, reported as EofButExpected(\"'{'\") at the rule's start span. The stylesheet ends before the rule's block opens.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/syntax/mod.rs:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the missing { } block for the rule","Collect errors after parsing for diagnostics","Fix the stylesheet"],"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"}