@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
27 lines • 974 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.processValue = processValue;
const graph_1 = require("../../graph/graph");
const vertex_1 = require("../../graph/vertex");
const identifier_1 = require("../../environments/identifier");
/**
* Processes a value node in the AST for dataflow analysis.
* For example, literals like numbers.
*/
function processValue({ info: { id } }, { cds, completeAst: { idMap }, environment }) {
return {
unknownReferences: [],
in: [{ nodeId: id, name: undefined, cds, type: identifier_1.ReferenceType.Constant }],
out: [],
environment,
graph: new graph_1.DataflowGraph(idMap).addVertex({
tag: vertex_1.VertexType.Value,
id,
cds
}, undefined),
exitPoints: [{ nodeId: id, type: 0 /* ExitPointType.Default */, cds }],
entryPoint: id,
hooks: []
};
}
//# sourceMappingURL=process-value.js.map