UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

19 lines 825 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.foldAst = foldAst; const stateful_fold_1 = require("./stateful-fold"); const down = () => undefined; /** * Folds in old functional-fashion over the AST structure. * <p> * Internally implemented as a special case of a two-way fold (with the down part as an essential no-op) */ function foldAst(ast, folds) { // eslint-disable-next-line @typescript-eslint/no-explicit-any -- just so we do not have to re-create const statefulFolds = folds; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access statefulFolds.down = down; // eslint-disable-next-line @typescript-eslint/no-unsafe-argument return (0, stateful_fold_1.foldAstStateful)(ast, undefined, statefulFolds); } //# sourceMappingURL=fold.js.map