UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

33 lines 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowrAnalyzerQmdFilePlugin = 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"); const QmdPattern = /\.qmd$/i; /** * The plugin provides support for Quarto R Markdown (`.qmd`) files */ class FlowrAnalyzerQmdFilePlugin extends flowr_analyzer_file_plugin_1.FlowrAnalyzerFilePlugin { name = 'qmd-file-plugin'; description = 'Parses Quarto R Markdown files'; version = new semver_1.SemVer('0.1.0'); pattern; /** * Creates a new instance of the Quarto R Markdown file plugin. * @param filePattern - The pattern to identify Quarto R Markdown files, see {@link QmdPattern} for the default pattern. */ constructor(filePattern = QmdPattern) { 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); } } exports.FlowrAnalyzerQmdFilePlugin = FlowrAnalyzerQmdFilePlugin; //# sourceMappingURL=flowr-analyzer-qmd-file-plugin.js.map