Support external implementations of FileSpan.

Previously, several FileSpan methods assumed that all FileSpans were
implementations of this package's FileSpan class. However, this may not
always be true. It can be useful to create FileSpans without first
creating a SourceFile when efficient representations of line/column
information are already available, and the user doesn't want to eagerly
do the parsing necessary to create a full SourceFile.

This also fixes an inconsistency between FileSpan.== and
FileSpan.hashCode.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1298093002 .
3 files changed
tree: 261f27e81d066f5b471c269022937a07f26587de
  1. pkgs/