diagnostic method

SourceRange diagnostic(
  1. Diagnostic diagnostic
)

A source range that covers the same range as the given diagnostic.

Implementation

SourceRange diagnostic(Diagnostic diagnostic) =>
    SourceRange(diagnostic.offset, diagnostic.length);