UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

18 lines (17 loc) 1.14 kB
import type { DataflowGraph } from '../../../dataflow/graph/graph'; import type { RNode } from '../../../r-bridge/lang-4.x/ast/model/model'; import type { RAccess, RNamedAccess } from '../../../r-bridge/lang-4.x/ast/model/nodes/r-access'; import type { ParentInformation } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate'; import type { DataFrameExpressionInfo } from '../absint-info'; /** * Maps a concrete data frame access to abstract data frame operations. * * @param node - The R node of the access * @param dfg - The data flow graph for resolving the arguments * @returns Data frame expression info containing the mapped abstract data frame operations, or `undefined` if the node does not represent a data frame access */ export declare function mapDataFrameAccess(node: RNode<ParentInformation>, dfg: DataflowGraph): DataFrameExpressionInfo | undefined; /** * Checks whether an access node represents a string-based access (`$` or `@`), and no index-based access (`[` or `[[`). */ export declare function isStringBasedAccess(access: RAccess<ParentInformation>): access is RNamedAccess<ParentInformation>;