code: function(inside, before, insert, root) {
          root = root || _.languages;
          var grammar = root[inside];
  
          if (arguments.length == 2) {
            insert = arguments[1];
  
            for (var newToken in insert) {
              if (insert.hasOwnProperty(newToken)) {
                grammar[newToken] = insert[newToken];
              }
            }
  
            return grammar;
          }
  
          var ret = {};
  
          for (var token in grammar) {
            if (grammar.hasOwnProperty(token)) {
              if (token == before) {
                for (var newToken in insert) {
                  if (insert.hasOwnProperty(newToken)) {
                    ret[newToken] = insert[newToken];
                  }
                }
              }
  
              ret[token] = grammar[token];
            }
          }
  
          // Update references in other language definitions
          _.languages.DFS(_.languages, function(key, value) {
            if (value === root[inside] && key != inside) {
              this[key] = ret;
            }
          });
  
          return (root[inside] = ret);
        }
docs: Insert a token before another token in a language literal
  As this needs to recreate the object (we cannot actually insert before keys in object literals),
  we cannot just provide an object, we need anobject and a key.
  @param inside The key (or language id) of the parent
  @param before The key to insert before. If not provided, the function appends instead.
  @param insert Object with the key/value pairs to insert
  @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted.