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

Method pascalLocalType

src/extraction/tree-sitter.ts:10034–10040  ·  view source on GitHub ↗

* The declared type of a name the enclosing routines declare (null: none it * can be named by), or undefined when none does. `textLocals` are the * declarations the source text gives a broken tree's routine.

(lower: string, textLocals?: Map<string, string | null> | null)

Source from the content-addressed store, hash-verified

10032 * declarations the source text gives a broken tree's routine.
10033 */
10034 private pascalLocalType(lower: string, textLocals?: Map<string, string | null> | null): string | null | undefined {
10035 for (let i = this.pascalScopes.length - 1; i >= 0; i--) {
10036 const locals = this.pascalScopes[i]!.locals;
10037 if (locals.has(lower)) return locals.get(lower);
10038 }
10039 return textLocals?.has(lower) ? textLocals.get(lower) : undefined;
10040 }
10041
10042 /**
10043 * The class and routine a name at `line` belongs to; null outside any code.

Callers 4

pushPascalChainCallMethod · 0.95
learnPascalVariableMethod · 0.95

Calls 2

hasMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected