code: function (o) {
        var type = Prism.util.type(o);
  
        switch (type) {
          case 'Object':
            var clone = {};
  
            for (var key in o) {
              if (o.hasOwnProperty(key)) {
                clone[key] = Prism.util.clone(o[key]);
              }
            }
  
            return clone;
  
          case 'Array':
            return o.slice();
        }
  
        return o;
      }
docs: Deep clone a language definition (e.g. to extend it)