@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
21 lines • 979 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.versionReplString = versionReplString;
exports.printVersionRepl = printVersionRepl;
const version_1 = require("../../util/version");
/**
* Returns a version string for the REPL including flowR and R version.
*/
async function versionReplString(parser) {
const version = await (0, version_1.retrieveVersionInformation)(parser);
const rVersion = version.r === 'none' ? '' : version.r === 'unknown' ? ', R version unknown' : `, R v${version.r}`;
const treeSitterVer = parser.name === 'tree-sitter' ? `, R grammar v${parser.treeSitterVersion()}` : '';
return `flowR repl using flowR v${version.flowr}${rVersion}${treeSitterVer} (${version.engine} engine)`;
}
/**
* Prints the version information for the REPL including flowR and R version.
*/
async function printVersionRepl(parser) {
console.log(await versionReplString(parser));
}
//# sourceMappingURL=print-version.js.map