Files
atom/src/first-mate-helpers.js
2019-05-31 18:33:56 +02:00

12 lines
263 B
JavaScript

module.exports = {
fromFirstMateScopeId(firstMateScopeId) {
let atomScopeId = -firstMateScopeId;
if ((atomScopeId & 1) === 0) atomScopeId--;
return atomScopeId + 256;
},
toFirstMateScopeId(atomScopeId) {
return -(atomScopeId - 256);
}
};