@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
21 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.identifyLinkToRelation = identifyLinkToRelation;
const identify_link_to_last_call_relation_1 = require("./identify-link-to-last-call-relation");
const identify_link_to_nested_call_relation_1 = require("./identify-link-to-nested-call-relation");
const assert_1 = require("../../../util/assert");
/**
* This facade selects the appropriate link-to relation identification function
* based on the type of link-to relation specified.
*/
async function identifyLinkToRelation(from, analyzer, l, knownCalls) {
switch (l.type) {
case 'link-to-last-call':
return (0, identify_link_to_last_call_relation_1.identifyLinkToLastCallRelation)(from, analyzer, l, knownCalls);
case 'link-to-nested-call':
return (0, identify_link_to_nested_call_relation_1.identifyLinkToNestedRelation)(from, analyzer, l);
default:
(0, assert_1.assertUnreachable)(l);
}
}
//# sourceMappingURL=identify-link-to-relation.js.map