"use strict";
function remapBranch(genItem, getMapping) {
var locations = [];
var source = void 0;
for (var i = 0; i < genItem.locations.length; ++i) {
var mapping = getMapping(genItem.locations[i]);
if (!mapping) {
return null;
}
if (!source) {
source = mapping.source;
} else {
Iif (source !== mapping.source) {
return null;
}
}
locations.push(mapping.loc);
}
var srcItem = {
line: locations[0].start.line,
type: genItem.type,
locations: locations
};
return { source: source, srcItem: srcItem };
}
module.exports = remapBranch;
//# sourceMappingURL=remapBranch.js.map |