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

Function close_call_tail

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

`\s*\)?\s*\(` at `i` → position after the `(`. The optional `)` needs no backtracking: retrying without a consumed `)` lands `\(` on that `)`.

(s: &[u8], i: usize)

Source from the content-addressed store, hash-verified

337
338/// `\s*\)?\s*\(` at `i` → position after the `(`. The optional `)` needs no
339/// backtracking: retrying without a consumed `)` lands `\(` on that `)`.
340fn close_call_tail(s: &[u8], i: usize) -> Option<usize> {
341 let mut j = skip_jsws(s, i);
342 if s.get(j) == Some(&b')') {
343 j = skip_jsws(s, j + 1);
344 }
345 if s.get(j) == Some(&b'(') {
346 return Some(j + 1);
347 }
348 None
349}
350
351// ---------- scanners ----------

Callers 2

scan_dispatchFunction · 0.85
scan_array_dispatchFunction · 0.85

Calls 2

skip_jswsFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected