@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
10 lines (9 loc) • 642 B
TypeScript
import type { ControlFlowGraph } from './cfg';
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
/**
* Visit all nodes reachable from the start node in the control flow graph, traversing the dependencies but ignoring cycles.
* @param graph - The control flow graph.
* @param startNode - The node to start the traversal from.
* @param visitor - The visitor function to call for each node, if you return true the traversal from this node will be stopped.
*/
export declare function visitCfgInReverseOrder(graph: ControlFlowGraph, startNode: NodeId, visitor: (node: NodeId) => boolean | void): void;