@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
20 lines (19 loc) • 663 B
TypeScript
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id';
import type { DataflowGraph } from '../graph/graph';
/**
* Finds the definition of a variable and all other uses from that point on
*
* For example, for the following code
* ```ts
* y <- 5
* f <- function() {
* y <- 8
* print(y)
* }
* ```
* @example getAllRefsToSymbol('3\@y') returns ['3\@y', '4\@y']
* @param graph - Dataflow Graph
* @param nodeId - NodeId of Symbol to resolve
* @returns List including the Definitions and References to that definition
*/
export declare function getAllRefsToSymbol(graph: DataflowGraph, nodeId: NodeId): NodeId[] | undefined;