UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

22 lines (21 loc) 684 B
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 Refereneces to that definition */ export declare function getAllRefsToSymbol(graph: DataflowGraph, nodeId: NodeId): NodeId[] | undefined;