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

Function yieldsValue

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

Whether a routine gives a value — a function or a constructor — rather than a procedure.

(routine: Node, context: ResolutionContext)

Source from the content-addressed store, hash-verified

2788
2789/** Whether a routine gives a value — a function or a constructor — rather than a procedure. */
2790function yieldsValue(routine: Node, context: ResolutionContext): boolean {
2791 if (routine.returnType) return true;
2792 const keyword = routineKeyword(routine, context);
2793 return keyword === 'function' || keyword === 'constructor';
2794}
2795
2796/** The keyword that declares a routine (`function`, `procedure`, `constructor`, …), lowercased, or null. */
2797function routineKeyword(routine: Node, context: ResolutionContext): string | null {

Callers 1

matchPascalParenlessRefFunction · 0.85

Calls 1

routineKeywordFunction · 0.85

Tested by

no test coverage detected