function comparePhrases(newPhrase, legacyPhrase) /*: number */ {
  if (newPhrase.filepath !== legacyPhrase.filepath) {
    return newPhrase.filepath < legacyPhrase.filepath ? -1 : 1;
  }
  if (newPhrase.line_beg !== legacyPhrase.line_beg) {
    return newPhrase.line_beg < legacyPhrase.line_beg ? -1 : 1;
  }
  if (newPhrase.col_beg !== legacyPhrase.col_beg) {
    return newPhrase.col_beg < legacyPhrase.col_beg ? -1 : 1;
  }
  return 0;
}
Compare phrases based on (filepath, line_beg, col_beg) in this order