@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
33 lines (32 loc) • 1.97 kB
TypeScript
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
import Joi from 'joi';
import type { ParsedQueryLine } from '../../query';
import { executeHigherOrderQuery } from './inspect-higher-order-query-executor';
import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
import type { SlicingCriterion } from '../../../slicing/criterion/parse';
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
import type { FlowrConfig } from '../../../config';
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
/**
* Either returns all function definitions alongside whether they are higher-order functions,
* or just those matching the filters.
*/
export interface InspectHigherOrderQuery extends BaseQueryFormat {
readonly type: 'inspect-higher-order';
readonly filter?: SlicingCriterion[];
}
export interface InspectHigherOrderQueryResult extends BaseQueryResult {
readonly higherOrder: Record<NodeId, boolean>;
}
declare function inspectHoLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'inspect-higher-order'>;
export declare const InspectHigherOrderQueryDefinition: {
readonly title: "Inspect Higher-Order Functions Query";
readonly executor: typeof executeHigherOrderQuery;
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
readonly fromLine: typeof inspectHoLineParser;
readonly completer: typeof criteriaQueryCompleter;
readonly syntax: "@inspect-higher-order [(<crit>;...)] <code | file://path>";
readonly schema: Joi.ObjectSchema<any>;
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
};
export {};