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

Function fnptr_decl

codegraph-kernel/src/cfnptr.rs:1049–1060  ·  view source on GitHub ↗

FNPTR_DECL_RE (first match): /\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/

(part: &[u8])

Source from the content-addressed store, hash-verified

1047}
1048
1049/// FNPTR_DECL_RE (first match): /\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/
1050fn fnptr_decl(part: &[u8]) -> Option<Range> {
1051 let mut i = 0usize;
1052 while i < part.len() {
1053 if part[i] == b'(' {
1054 if let Some((name, _)) = fnptr_paren_tail(part, i) {
1055 return Some(name);
1056 }
1057 }
1058 i += 1;
1059 }
1060 None
1061}
1062
1063/// Port of `parseStructFieldsRaw` — structure only, classification TS-side.

Callers 1

parse_struct_fields_rawFunction · 0.85

Calls 2

fnptr_paren_tailFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected