UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

33 lines 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.processQuote = processQuote; const known_call_handling_1 = require("../known-call-handling"); const edge_1 = require("../../../../../graph/edge"); function processQuote(name, args, rootId, data, config) { const { information, processedArguments, fnRef } = (0, known_call_handling_1.processKnownFunctionCall)({ name, args, rootId, data, forceArgs: config.forceArgs }); const inRefs = [fnRef]; const outRefs = []; const unknownRefs = []; for (let i = 0; i < args.length; i++) { const processedArg = processedArguments[i]; if (processedArg && i !== config?.quoteArgumentsWithIndex) { inRefs.push(...processedArg.in); outRefs.push(...processedArg.out); unknownRefs.push(...processedArg.unknownReferences); } else if (processedArg) { information.graph.addEdge(rootId, processedArg.entryPoint, edge_1.EdgeType.NonStandardEvaluation); /* nse actually affects _everything_ within that argument! */ for (const [vtx,] of processedArg.graph.vertices(true)) { information.graph.addEdge(rootId, vtx, edge_1.EdgeType.NonStandardEvaluation); } } } return { ...information, in: inRefs, out: outRefs, unknownReferences: unknownRefs }; } //# sourceMappingURL=built-in-quote.js.map