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

Function yieldsValue

src/resolution/pascal-scope.ts:1254–1258  ·  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

1252
1253/** Whether a routine gives a value — a function or a constructor — rather than a procedure. */
1254function yieldsValue(routine: Node, context: ResolutionContext): boolean {
1255 if (routine.returnType) return true;
1256 const keyword = routineKeyword(routine, context);
1257 return keyword === 'function' || keyword === 'constructor';
1258}
1259
1260/** The keyword that declares a routine (`function`, `procedure`, `constructor`, …), lowercased, or null. */
1261function routineKeyword(routine: Node, context: ResolutionContext): string | null {

Callers 1

matchPascalParenlessRefFunction · 0.85

Calls 1

routineKeywordFunction · 0.85

Tested by

no test coverage detected