{"record":{"id":"3ce43214f41ae796","repo":"swc-project/swc","slug":"expected-between-start-and-end-in-unicode-rang","errorCode":null,"errorMessage":"Expected '-' between start and end in unicode range","messagePattern":"Expected '-' between start and end in unicode range","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/swc_css_parser/src/parser/values_and_units/mod.rs","lineNumber":2997,"sourceCode":"\n        // Otherwise, interpret the consumed code points as a hexadecimal number. This\n        // is the start value.\n\n        // 4. If there are no code points left in text, The end value is the same as the\n        // start value. Exit this algorithm.\n        if next.is_none() {\n            return Ok(UnicodeRange {\n                span: span!(self, span.lo),\n                start: self.input.atom(start),\n                end: None,\n                raw: Some(self.input.atom(unicode_range)),\n            });\n        }\n\n        // 5. If the next code point in text is U+002D HYPHEN-MINUS (-), consume it.\n        // Otherwise, this is an invalid <urange>, and this algorithm must exit.\n        if next != Some('-') {\n            return Err(Error::new(\n                span,\n                ErrorKind::Expected(\"'-' between start and end in unicode range\"),\n            ));\n        } else {\n            next = chars.next();\n        }\n\n        // 6. Consume as many hex digits as possible from text.\n        // If zero hex digits were consumed, or more than 6 hex digits were consumed,\n        // this is an invalid <urange>, and this algorithm must exit. If there are any\n        // code points left in text, this is an invalid <urange>, and this algorithm\n        // must exit.\n        let mut end = String::new();\n\n        loop {\n            match next {\n                Some(c) if c.is_ascii_digit() => {\n                    end.push(c);","sourceCodeStart":2979,"sourceCodeEnd":3015,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/swc_css_parser/src/parser/values_and_units/mod.rs#L2979-L3015","documentation":"Fired during <urange> parsing: after the start value, if text remains it must begin with '-' (U+002D) separating start and end values. Any other character where the hyphen is expected invalidates the production.","triggerScenarios":"Thrown at crates/swc_css_parser/src/parser/values_and_units/mod.rs:2997 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Separate start and end with '-': 'U+0-7F'","Remove extra characters if a single code point was intended"],"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"}