docs: function compareLocation(nodeA, nodeB) {
    var locA = nodeA && nodeA.loc;
    var locB = nodeB && nodeB.loc;
    if (!locA && !locB) {
      return 0;
    }
    else if (Boolean(locA) !== Boolean(locB)) {
      return locA ? +1 : locB ? -1 : 0;
    }
    else {
      var result =
        isOrdered(locB.end,   locA.start) ? +1 : isOrdered(locA.end,   locB.start) ? -1 : // non-overlapping
        isOrdered(locB.start, locA.start) ? +1 : isOrdered(locA.start, locB.start) ? -1 : // overlapping
        isOrdered(locA.end,   locB.end  ) ? +1 : isOrdered(locB.end,   locA.end  ) ? -1 : // enclosed
        0;
      return result;
    }
  }