function getCallbackInfo(node){var retv={isCallback:false,isLexicalThis:false};var parent=node.parent;while(node){switch(parent.type){// Checks parents recursively.
case"LogicalExpression":case"ConditionalExpression":break;// Checks whether the parent node is `.bind(this)` call.
case"MemberExpression":if(parent.object===node&&!parent.property.computed&&parent.property.type==="Identifier"&&parent.property.name==="bind"&&parent.parent.type==="CallExpression"&&parent.parent.callee===parent){retv.isLexicalThis=parent.parent.arguments.length===1&&parent.parent.arguments[0].type==="ThisExpression";node=parent;parent=parent.parent;}else{return retv;}break;// Checks whether the node is a callback.
case"CallExpression":case"NewExpression":if(parent.callee!==node){retv.isCallback=true;}return retv;default:return retv;}node=parent;parent=parent.parent;}/* istanbul ignore next */throw new Error("unreachable");}
Checkes whether or not a given node is a callback.
@param {ASTNode} node - A node to check.
@returns {Object}
  {boolean} retv.isCallback - `true` if the node is a callback.
  {boolean} retv.isLexicalThis - `true` if the node is with `.bind(this)`.