error method

SourceRange error(
  1. AnalysisError error
)

Return a source range that covers the same range as the given error.

Implementation

SourceRange error(AnalysisError error) {
  return SourceRange(error.offset, error.length);
}