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

Function ownUnitDeclaration

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

The unit's own declaration of a name, seen from one of its files (see ownUnitFiles).

(fromFile: string, lower: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

858
859/** The unit's own declaration of a name, seen from one of its files (see ownUnitFiles). */
860function ownUnitDeclaration(fromFile: string, lower: string, context: ResolutionContext): Node | undefined {
861 for (const file of ownUnitFiles(fromFile, context)) {
862 const decl = unitDeclaration(file, lower, context);
863 if (decl) return decl;
864 }
865 return undefined;
866}
867
868/**
869 * The files whose declarations are a file's unit's own, the file first: the

Callers 2

declarationInScopeFunction · 0.85
headOfFunction · 0.85

Calls 2

ownUnitFilesFunction · 0.85
unitDeclarationFunction · 0.85

Tested by

no test coverage detected