@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
38 lines (37 loc) • 1.9 kB
TypeScript
import type { FlowrSearchElement, FlowrSearchGeneratorNodeBase, FlowrSearchGetFilter, FlowrSearchInput } from '../flowr-search';
import { FlowrSearchElements } from '../flowr-search';
import type { Pipeline } from '../../core/steps/pipeline/pipeline';
import type { TailTypesOrUndefined } from '../../util/arrays';
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
import type { SlicingCriteria } from '../../slicing/criterion/parse';
/**
* This is a union of all possible generator node types
*/
export type FlowrSearchGeneratorNode = {
[K in GeneratorNames]: FlowrSearchGeneratorNodeBase<K, TailTypesOrUndefined<Parameters<typeof generators[K]>>>;
}[GeneratorNames];
export type GeneratorNames = keyof typeof generators;
export type GetGenerator<Name extends GeneratorNames> = FlowrSearchGeneratorNode & {
name: Name;
};
/**
* All supported generators!
*/
export declare const generators: {
readonly all: typeof generateAll;
readonly get: typeof generateGet;
readonly criterion: typeof generateCriterion;
readonly from: typeof generateFrom;
};
declare function generateAll(data: FlowrSearchInput<Pipeline>): FlowrSearchElements<ParentInformation>;
declare function generateGet(data: FlowrSearchInput<Pipeline>, { filter: { line, column, id, name, nameIsRegex } }: {
filter: FlowrSearchGetFilter;
}): FlowrSearchElements<ParentInformation>;
declare function generateFrom(data: FlowrSearchInput<Pipeline>, args: {
from: FlowrSearchElement<ParentInformation> | FlowrSearchElement<ParentInformation>[];
}): FlowrSearchElements<ParentInformation>;
declare function generateCriterion(data: FlowrSearchInput<Pipeline>, args: {
criterion: SlicingCriteria;
}): FlowrSearchElements<ParentInformation>;
export declare function getGenerator<Name extends GeneratorNames>(name: Name): typeof generators[Name];
export {};