code: function toExpression(node) {
    if (t.isExpressionStatement(node)) {
      node = node.expression;
    }
  
    if (t.isClass(node)) {
      node.type = "ClassExpression";
    } else if (t.isFunction(node)) {
      node.type = "FunctionExpression";
    }
  
    if (t.isExpression(node)) {
      return node;
    } else {
      throw new Error("cannot turn " + node.type + " to an expression");
    }
  }
docs: [Please add a description.]