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

Function fitsArguments

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

Whether a call's argument count fits a routine's parameters; true when either can't be read.

(routine: Node, ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

398
399/** Whether a call's argument count fits a routine's parameters; true when either can't be read. */
400function fitsArguments(routine: Node, ref: UnresolvedRef, context: ResolutionContext): boolean {
401 const count = pascalCallArgumentCount(ref, context);
402 const range = pascalParameterRange(routine.signature);
403 return count === null || range === null || (count >= range[0] && count <= range[1]);
404}
405
406/** Whether a routine takes exactly a call's argument count, none of them left to a default. */
407function takesExactly(routine: Node, ref: UnresolvedRef, context: ResolutionContext): boolean {

Callers 1

gatePascalCallFunction · 0.85

Calls 2

pascalCallArgumentCountFunction · 0.85
pascalParameterRangeFunction · 0.85

Tested by

no test coverage detected