MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / ret_wrapper_re

Function ret_wrapper_re

codegraph-kernel/src/ccpp/mod.rs:125–131  ·  view source on GitHub ↗

normalizeCppReturnType: smart-pointer/optional unwrap.

()

Source from the content-addressed store, hash-verified

123}
124/// normalizeCppReturnType: smart-pointer/optional unwrap.
125fn ret_wrapper_re() -> &'static Regex {
126 static RE: OnceLock<Regex> = OnceLock::new();
127 RE.get_or_init(|| {
128 Regex::new(r"\b(?:std\s*::\s*)?(?:unique_ptr|shared_ptr|weak_ptr|optional)\s*<\s*([^,>]+?)\s*>")
129 .unwrap()
130 })
131}
132fn ret_keyword_re() -> &'static Regex {
133 static RE: OnceLock<Regex> = OnceLock::new();
134 RE.get_or_init(|| Regex::new(r"\b(?:const|volatile|typename|struct|class|enum)\b").unwrap())

Callers 1

Calls 1

unwrapMethod · 0.60

Tested by

no test coverage detected