UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

28 lines (27 loc) 2.35 kB
import { type DataflowProcessorInformation } from '../../../../../processor'; import type { DataflowInformation } from '../../../../../info'; import { InferWorkingDirectory } from '../../../../../../config'; import type { RParseRequest, RParseRequestProvider } from '../../../../../../r-bridge/retriever'; import type { IdGenerator, ParentInformation } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/decorate'; import type { RFunctionArgument } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-function-call'; import type { RSymbol } from '../../../../../../r-bridge/lang-4.x/ast/model/nodes/r-symbol'; import type { NodeId } from '../../../../../../r-bridge/lang-4.x/ast/model/processing/node-id'; import type { NoInfo } from '../../../../../../r-bridge/lang-4.x/ast/model/model'; export declare function setSourceProvider(provider: RParseRequestProvider): void; export declare function inferWdFromScript(option: InferWorkingDirectory, referenceChain: readonly RParseRequest[]): string[]; /** * Tries to find sourced by a source request and returns the first path that exists * @param seed - the path originally requested in the `source` call * @param data - more information on the loading context */ export declare function findSource(seed: string, data: { referenceChain: readonly RParseRequest[]; }): string[] | undefined; export declare function processSourceCall<OtherInfo>(name: RSymbol<OtherInfo & ParentInformation>, args: readonly RFunctionArgument<OtherInfo & ParentInformation>[], rootId: NodeId, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, config: { /** should this produce an explicit source function call in the graph? */ includeFunctionCall?: boolean; /** should this function call be followed, even when the configuration disables it? */ forceFollow?: boolean; }): DataflowInformation; export declare function sourceRequest<OtherInfo>(rootId: NodeId, request: RParseRequest, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, information: DataflowInformation, getId: IdGenerator<NoInfo>): DataflowInformation; export declare function standaloneSourceFile<OtherInfo>(inputRequest: RParseRequest, data: DataflowProcessorInformation<OtherInfo & ParentInformation>, uniqueSourceId: string, information: DataflowInformation): DataflowInformation;