UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

27 lines (26 loc) 1.34 kB
import { FlowrAnalyzerFilePlugin } from './flowr-analyzer-file-plugin'; import { SemVer } from 'semver'; import type { PathLike } from 'fs'; import type { FlowrAnalyzerContext } from '../../context/flowr-analyzer-context'; import type { FlowrFileProvider } from '../../context/flowr-file'; /** * This plugin provides supports for the identification of installed files (files below an `inst/` folder). * If you use multiple plugins, this should be included *before* other plugins. */ export declare class FlowrAnalyzerMetaInstFilesPlugin extends FlowrAnalyzerFilePlugin { readonly name = "flowr-analyzer-inst-files-plugin"; readonly description = "Loads installed files."; readonly version: SemVer; private readonly pathPattern; /** * Creates a new instance of the INST file plugin. * @param pathPattern - The pathPattern to identify INST files, see {@link InstPathPattern} for the default pathPattern. */ constructor(pathPattern?: RegExp); applies(file: PathLike): boolean; /** * Processes the given file, assigning it the {@link FileRole.Install} role. * Given that the file may still need to be processed by other plugins, this method returns the `true` flag for that purpose. */ process(_ctx: FlowrAnalyzerContext, file: FlowrFileProvider): [FlowrFileProvider, true]; }