code: function injectEnvs(node) {
      switch (node.type) {
          case 'Program':
              node.$env = new Map;
              node.$depth = 0;
              break;
          case 'FunctionExpression':
              node.$env = new Map;
              node.$depth = 1 + getEnclosingScope(node.$parent).$depth;
              if (node.id) {
                  node.$env.put(node.id.name, node.id)
              }
              for (var i=0; i<node.params.length; i++) {
                  node.$env.put(node.params[i].name, node.params[i])
              }
              node.$env.put('arguments', node)
              break;
          case 'FunctionDeclaration':
              var parent = getEnclosingFunction(node.$parent); // note: use getEnclosingFunction, because fun decls are lifted outside catch clauses
              node.$env = new Map;
              node.$depth = 1 + parent.$depth;
              parent.$env.put(node.id.name, node.id)
              for (var i=0; i<node.params.length; i++) {
                  node.$env.put(node.params[i].name, node.params[i])
              }
              node.$env.put('arguments', node)
              break;
          case 'CatchClause':
              node.$env = new Map;
              node.$env.put(node.param.name, node.param)
              node.$depth = 1 + getEnclosingScope(node.$parent).$depth;
              break;
          case 'VariableDeclarator':
              var parent = getEnclosingFunction(node) // note: use getEnclosingFunction, because vars ignore catch clauses
              parent.$env.put(node.id.name, node.id)
              break;
      }
      children(node).forEach(injectEnvs)
  }
docs: Injects an the following into functions, programs, and catch clauses - $env: Map from variable names in scope to Identifier at declaration - $depth: nesting depth from top-level