UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

14 lines (13 loc) 1.13 kB
import type { FunctionArgument } from '../../dataflow/graph/graph'; import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id'; import type { SigParameter } from './decode'; /** the {@link pMatch} parameter spec of a *known* signature: every formal maps to itself as its own target */ export declare function signatureParameterSpec(signature: readonly SigParameter[]): Record<string, string>; /** * {@link pMatch|Matches} a call's `args` against a *known* signature (typically from the signature database via * `PackageSignatureSource.functions(pkg)`), returning per parameter name the id(s) bound to it, e.g. * `matchArgumentsToSignature(ggplotCall.args, ggplotSignature).get('data')`. */ export declare function matchArgumentsToSignature(args: readonly FunctionArgument[], signature: readonly SigParameter[]): Map<string, NodeId[]>; /** the id(s) {@link matchArgumentsToSignature} binds to a single `parameter`, `undefined` if nothing is */ export declare function argumentForParameter(args: readonly FunctionArgument[], signature: readonly SigParameter[], parameter: string): NodeId[] | undefined;