parser.js
function deepCopy(obj) {
  var result = {};
  var type = toString.call(obj);

  if (!obj || (type === "[object RegExp]") || typeof obj !== "object")
    return obj;

  if (type === "[object Array]")
    return slice.call(obj);

  for (var k in obj) {
    result[k] = deepCopy(obj[k])
  }

  return result;
}
function deepCopy(obj) {
  var result = {};
  var type = toString.call(obj);

  if (!obj || (type === "[object RegExp]") || typeof obj !== "object")
    return obj;

  if (type === "[object Array]")
    return slice.call(obj);

  for (var k in obj) {
    result[k] = deepCopy(obj[k])
  }

  return result;
}
深度拷贝