@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
19 lines • 1.16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.processDataflowFor = processDataflowFor;
/**
* Originally, dataflow processor was written as a two-way fold, but this produced problems when trying to resolve function calls
* which require information regarding the calling *and* definition context. While this only is a problem for late bindings as they happen
* with functions (and probably quote'd R-expressions), it is still a problem that must be dealt with.
* Therefore, the dataflow processor has no complete control over the traversal and merge strategy of the graph, with each processor being in
* the position to call the other processors as needed for its children.
* <p>
* Now this method can be called recursively within the other processors to parse the dataflow for nodes that you cannot narrow down
* in type or context.
* @param current - The current node to start processing from
* @param data - The initial (/current) information to be passed down
*/
function processDataflowFor(current, data) {
return data.processors[current.type](current, data);
}
//# sourceMappingURL=processor.js.map