function expandMemberExpression(str) {
  var segs = str.split(".");
  var expr = types.memberExpression(types.identifier(segs[0]), types.identifier(segs[1]));
  for (var i = 2; i < segs.length; i++) {
    expr = types.memberExpression(expr, types.identifier(segs[i]));
  }
  return expr;
}
function expandMemberExpression(str) {
  var segs = str.split(".");
  var expr = types.memberExpression(types.identifier(segs[0]), types.identifier(segs[1]));
  for (var i = 2; i < segs.length; i++) {
    expr = types.memberExpression(expr, types.identifier(segs[i]));
  }
  return expr;
}
function expandMemberExpression ( str ) { var segs = str . split ( "." ) ; var expr = types . memberExpression ( types . identifier ( segs [ 0 ] ) , types . identifier ( segs [ 1 ] ) ) ; for ( var i = 2 ; i < segs . length ; i ++ ) { expr = types . memberExpression ( expr , types . identifier ( segs [ i ] ) ) ; } return expr ; }
Helper method that expands a dotted string into MemberExpression
@param str
@returns {*}
Helper method that expands a dotted string into MemberExpression