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

Function fnptr_decl

codegraph-kernel/src/cfnptr.rs:1067–1078  ·  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

1065}
1066
1067/// FNPTR_DECL_RE (first match): /\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/
1068fn fnptr_decl(part: &[u8]) -> Option<Range> {
1069 let mut i = 0usize;
1070 while i < part.len() {
1071 if part[i] == b'(' {
1072 if let Some((name, _)) = fnptr_paren_tail(part, i) {
1073 return Some(name);
1074 }
1075 }
1076 i += 1;
1077 }
1078 None
1079}
1080
1081/// 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