Files
atom/src/first-mate-helpers.js
2017-05-05 09:29:30 +02:00

12 lines
260 B
JavaScript

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