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

Function nameInScope

src/resolution/pascal-scope.ts:344–347  ·  view source on GitHub ↗

A bare name, looked up the way Delphi looks it up from a routine of class `cls` (null: a free routine): a routine, or null.

(name: string, cls: Node | null, ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

342
343/** A bare name, looked up the way Delphi looks it up from a routine of class `cls` (null: a free routine): a routine, or null. */
344function nameInScope(name: string, cls: Node | null, ref: UnresolvedRef, context: ResolutionContext): Found | null {
345 const decl = declarationInScope(name.toLowerCase(), cls, ref, context);
346 return decl && isRoutine(decl.node) ? decl : null;
347}
348
349/**
350 * The routine nested in the calling routine, or in one around it, that a

Callers 1

matchPascalParenlessRefFunction · 0.85

Calls 2

declarationInScopeFunction · 0.85
isRoutineFunction · 0.85

Tested by

no test coverage detected