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

Function topColon

src/resolution/rust-scopes.ts:256–259  ·  view source on GitHub ↗

A top-level `:` that is no part of a `::`, between `from` and `to`; -1 for none.

(code: string, from: number, to: number, close: Map<number, number>)

Source from the content-addressed store, hash-verified

254
255/** A top-level `:` that is no part of a `::`, between `from` and `to`; -1 for none. */
256function topColon(code: string, from: number, to: number, close: Map<number, number>): number {
257 const at = walkTop(code, from, to, close, true, (i) => code[i] === ':' && code[i + 1] !== ':' && code[i - 1] !== ':');
258 return at < to ? at : -1;
259}
260
261/** Whether the keyword `word` starts at `i`, a whole word. */
262function wordAt(code: string, i: number, word: string): boolean {

Callers 2

walkPatternFunction · 0.85
paramFunction · 0.85

Calls 1

walkTopFunction · 0.85

Tested by

no test coverage detected