UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

26 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowrAnalyzerRMarkdownFilePlugin = void 0; const semver_1 = require("semver"); const flowr_analyzer_file_plugin_1 = require("../flowr-analyzer-file-plugin"); const flowr_rmarkdown_file_1 = require("../files/flowr-rmarkdown-file"); const built_in_source_1 = require("../../../../dataflow/internal/process/functions/call/built-in/built-in-source"); /** * Common base of the plugins reading an R Markdown flavor, which differ only in the files they claim. */ class FlowrAnalyzerRMarkdownFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin { version = new semver_1.SemVer('0.1.0'); pattern; constructor(filePattern) { super(); this.pattern = filePattern; } applies(file) { return this.pattern.test((0, built_in_source_1.platformBasename)(file.toString())); } process(ctx, arg) { return flowr_rmarkdown_file_1.FlowrRMarkdownFile.from(arg, ctx); } } exports.FlowrAnalyzerRMarkdownFilePlugin = FlowrAnalyzerRMarkdownFilePlugin; //# sourceMappingURL=flowr-analyzer-rmarkdown-file-plugin.js.map