SourceRange constructor

SourceRange(
  1. SourceLocation start,
  2. SourceLocation end
)

Create a SourceRange object.

The start and end locations are initialized from the given arguments.

They must have identical SourceLocation.source objects.

Implementation

SourceRange(this.start, this.end)
 : assert(start.source == end.source, 'The start and end locations have inconsistent source information.'),
   assert(start < end, 'The start location must be before the end location.');