MCPcopy Create free account
hub / github.com/VSCodeConfigHelper/v4 / clang

Function clang

src-tauri/src/steps/compiler/verparse.rs:29–38  ·  view source on GitHub ↗
(version_text: &str)

Source from the content-addressed store, hash-verified

27}
28
29pub fn clang(version_text: &str) -> Result<(&str, &str)> {
30 let re = Regex::new(r"(.* )?clang version (.+?)( \(.*\))?$").unwrap();
31 match re.captures(version_text) {
32 Some(caps) => Ok((
33 caps.get(2).unwrap().as_str(),
34 caps.get(3).map(|m| m.as_str()).unwrap_or(""),
35 )),
36 None => Err(anyhow!("clang version parse error"))?,
37 }
38}

Callers 1

newMethod · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected