{"record":{"id":"82695371d991eac4","repo":"swc-project/swc","slug":"expected-declaration-value","errorCode":null,"errorMessage":"Expected Declaration value","messagePattern":"Expected Declaration value","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":117,"sourceCode":"                        if *err.kind() != ErrorKind::Ignore {\n                            self.errors.push(err);\n                        }\n\n                        locv.children\n                    }\n                };\n\n                return Ok(ComponentValue::SimpleBlock(Box::new(block)));\n            }\n\n            tok!(\"#\") => {\n                return Ok(ComponentValue::Color(self.parse()?));\n            }\n\n            _ => {}\n        }\n\n        Err(Error::new(span, ErrorKind::Expected(\"Declaration value\")))\n    }\n\n    /// Parse value as <any-value>.\n    pub(super) fn parse_any_value(&mut self) -> PResult<Vec<TokenAndSpan>> {\n        let mut tokens = Vec::new();\n        let mut balance_stack: Vec<Option<char>> = Vec::new();\n\n        // The <any-value> production matches any sequence of one or more tokens,\n        // so long as the sequence ...\n        loop {\n            if is!(self, EOF) {\n                break;\n            }\n\n            match cur!(self) {\n                // ... <bad-string-token>, <bad-url-token>,\n                tok!(\"bad-string\") | tok!(\"bad-url\") => {\n                    break;","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L99-L135","documentation":"Fired in parse_generic_value when the current token does not map to any known component value production (not a function/color/hash/delim/etc.). The parser cannot build any AST node from this token, so it emits this fallback 'expected declaration value' error at the token's span.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the offending token with a valid component value (number, dimension, percentage, ident, function, etc.)","Check for typos or unsupported syntax at the reported position"],"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"}