UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

37 lines (36 loc) 1.76 kB
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format'; import { executeLocationMapQuery } from './location-map-query-executor'; import { type OutputFormatter } from '../../../util/text/ansi'; import Joi from 'joi'; import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id'; import type { SourceRange } from '../../../util/range'; import type { SlicingCriterion } from '../../../slicing/criterion/parse'; import type { ReplOutput } from '../../../cli/repl/commands/repl-main'; import type { FlowrConfig } from '../../../config'; import type { ParsedQueryLine } from '../../query'; export interface LocationMapQuery extends BaseQueryFormat { readonly type: 'location-map'; /** Optional list of ids to filter the results by. If not provided, all ids will be included. */ readonly ids?: readonly SlicingCriterion[]; } export type FileId = number & { readonly __fileId?: unique symbol; }; export type FilePath = string & { readonly __filePath?: unique symbol; }; export interface LocationMapQueryResult extends BaseQueryResult { readonly map: { files: Record<FileId, FilePath>; ids: Record<NodeId, [FileId, SourceRange]>; }; } declare function locationMapLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'location-map'>; export declare const LocationMapQueryDefinition: { readonly executor: typeof executeLocationMapQuery; readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true; readonly fromLine: typeof locationMapLineParser; readonly schema: Joi.ObjectSchema<any>; readonly flattenInvolvedNodes: () => never[]; }; export {};