UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

21 lines 693 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.executeLocationMapQuery = executeLocationMapQuery; const log_1 = require("../../../util/log"); function executeLocationMapQuery({ ast }, queries) { if (queries.length !== 1) { log_1.log.warn('Id-Map query expects only up to one query, but got', queries.length); } const start = Date.now(); const locationMap = {}; for (const [id, node] of ast.idMap.entries()) { locationMap[id] = node.location; } return { '.meta': { timing: Date.now() - start }, map: locationMap }; } //# sourceMappingURL=location-map-query-executor.js.map