@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
52 lines (51 loc) • 2.73 kB
TypeScript
import { type FlowrSearchElement, type FlowrSearchGeneratorNodeBase, type FlowrSearchGetFilter, FlowrSearchElements } from '../flowr-search';
import type { TailTypesOrUndefined } from '../../util/collections/arrays';
import type { ParentInformation } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
import { type SlicingCriteria } from '../../slicing/criterion/parse';
import { type Query } from '../../queries/query';
import type { ReadonlyFlowrAnalysisProvider } from '../../project/flowr-analyzer';
import type TreeSitter from 'web-tree-sitter';
export declare const searchLogger: import("tslog").Logger<import("tslog").ILogObj>;
/**
* 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;
readonly 'from-query': typeof generateFromQuery;
readonly syntax: typeof generateSyntax;
};
declare function generateAll(data: ReadonlyFlowrAnalysisProvider): Promise<FlowrSearchElements<ParentInformation>>;
declare function generateGet(input: ReadonlyFlowrAnalysisProvider, { filter: { line, column, id, name, nameIsRegex, filePathRegex } }: {
filter: FlowrSearchGetFilter;
}): Promise<FlowrSearchElements<ParentInformation>>;
declare function generateFrom(_input: ReadonlyFlowrAnalysisProvider, args: {
from: FlowrSearchElement<ParentInformation> | FlowrSearchElement<ParentInformation>[];
}): FlowrSearchElements<ParentInformation>;
declare function generateFromQuery(input: ReadonlyFlowrAnalysisProvider, args: {
from: readonly Query[];
}): Promise<FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>>;
declare function generateSyntax(input: ReadonlyFlowrAnalysisProvider, args: {
source: TreeSitter.Query | string;
captures: readonly string[];
}): Promise<FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>>;
declare function generateCriterion(input: ReadonlyFlowrAnalysisProvider, args: {
criterion: SlicingCriteria;
}): Promise<FlowrSearchElements<ParentInformation>>;
/**
* Gets the search generator function for the given name
*/
export declare function getGenerator<Name extends GeneratorNames>(name: Name): typeof generators[Name];
export {};