code: private static Node replaceReturnWithBreak(Node current, Node parent,
        String resultName, String labelName) {
  
      if (current.isFunction()
          || current.isExprResult()) {
        // Don't recurse into functions definitions, and expressions can't
        // contain RETURN nodes.
        return current;
      }
  
      if (current.isReturn()) {
        checkState(NodeUtil.isStatementBlock(parent));
  
        Node resultNode = getReplacementReturnStatement(current, resultName);
        Node breakNode = IR.breakNode(IR.labelName(labelName));
  
        // Replace the node in parent, and reset current to the first new child.
        breakNode.useSourceInfoIfMissingFromForTree(current);
        parent.replaceChild(current, breakNode);
        if (resultNode != null) {
          resultNode.useSourceInfoIfMissingFromForTree(current);
          parent.addChildBefore(resultNode, breakNode);
        }
        current = breakNode;
      } else {
        for (Node c = current.getFirstChild(); c != null; c = c.getNext()) {
          // c may be replaced.
          c = replaceReturnWithBreak(c, current, resultName, labelName);
        }
      }
  
      return current;
    }
docs: Replace the 'return' statement with its child expression.
  "return foo()" becomes "{foo(); break;}" or
  "{resultName = foo(); break;}"
  "return" becomes {break;} or "{resultName = void 0;break;}".