@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
16 lines • 533 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.rolesOfParents = rolesOfParents;
/**
* Returns the roles of the parents of the given node, starting with the parent-role of the node itself.
*/
function rolesOfParents(node, idMap) {
const roles = [];
let current = node;
while (current !== undefined) {
roles.push(current.info.role);
current = current.info.parent ? idMap.get(current.info.parent) : undefined;
}
return roles;
}
//# sourceMappingURL=role.js.map