{"record":{"id":"f0ddd58125423856","repo":"swc-project/swc","slug":"expected-or-token","errorCode":null,"errorMessage":"Expected '{', '(' or '[' token","messagePattern":"Expected '\\{', '\\(' or '\\[' token","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/syntax/mod.rs","lineNumber":846,"sourceCode":"            }\n        }\n    }\n}\n\nimpl<I> Parse<SimpleBlock> for Parser<I>\nwhere\n    I: ParserInput,\n{\n    fn parse(&mut self) -> PResult<SimpleBlock> {\n        // To consume a simple block:\n\n        // Create a simple block with its associated token set to the current input\n        // token and with its value initially set to an empty list.\n        let span = self.input.cur_span();\n        let name = match cur!(self) {\n            tok!(\"{\") | tok!(\"(\") | tok!(\"[\") => self.input.bump().unwrap(),\n            _ => {\n                return Err(Error::new(\n                    span,\n                    ErrorKind::Expected(\"'{', '(' or '[' token\"),\n                ));\n            }\n        };\n        let mut simple_block = SimpleBlock {\n            span: Default::default(),\n            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 => \"']'\",","sourceCodeStart":828,"sourceCodeEnd":864,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/syntax/mod.rs#L828-L864","documentation":"Fired by the <simple-block> parser: a simple block must begin with one of '{', '(' or '[' (its associated token), but the current token is something else. The parser cannot open any block at this position and returns an error to the caller for recovery.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/syntax/mod.rs:846 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open the block with '{', '(' or '[' as required by the grammar","Fix the preceding syntax so the parser reaches the block-opening token"],"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"}