{"record":{"id":"968abbc3bc55f260","repo":"swc-project/swc","slug":"unexpected-end-of-file-but-expected-968abb","errorCode":null,"errorMessage":"Unexpected end of file, but expected ']'","messagePattern":"Unexpected end of file, but expected '\\]'","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/syntax/mod.rs","lineNumber":872,"sourceCode":"            name,\n            value: Vec::new(),\n        };\n\n        // Repeatedly consume the next input token and process it as follows:\n        loop {\n            // <EOF-token>\n            // This is a parse error. Return the block.\n            if is!(self, EOF) {\n                let mirror = match &simple_block.name.token {\n                    Token::LBracket => \"']'\",\n                    Token::LParen => \"')'\",\n                    Token::LBrace => \"'}'\",\n                    _ => {\n                        unreachable!();\n                    }\n                };\n\n                self.errors.push(Error::new(\n                    span!(self, span.lo),\n                    ErrorKind::EofButExpected(mirror),\n                ));\n\n                break;\n            }\n\n            match cur!(self) {\n                // ending token\n                // Return the block.\n                tok!(\"]\") if simple_block.name.token == Token::LBracket => {\n                    bump!(self);\n\n                    break;\n                }\n                tok!(\")\") if simple_block.name.token == Token::LParen => {\n                    bump!(self);\n","sourceCodeStart":854,"sourceCodeEnd":890,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/syntax/mod.rs#L854-L890","documentation":"Fired while consuming a simple block opened with '[': EOF was reached before the matching ']' mirror token. Per CSS Syntax 5.4.7 this is a parse error; the parser returns the partially-consumed block and records this error instead of failing the whole parse.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/syntax/mod.rs:872 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Close the '[' block with a matching ']'","Check for unclosed brackets earlier in the stylesheet that swallow the intended closer"],"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"}