Interface SourceMapper

All Known Implementing Classes:
SegmentedSourceMapper

public interface SourceMapper
Maps offsets in generated/processed text back to the original source.
  • Method Summary

    Modifier and Type
    Method
    Description
    originalPos(int generatedOffset)
    Map an offset in the generated text back to its original SourcePos.
    originalSpan(int generatedStart, int generatedEnd)
    Map a half-open range [generatedStart, generatedEnd) in the generated text back to an original SourceSpan.
  • Method Details

    • originalPos

      SourcePos originalPos(int generatedOffset)
      Map an offset in the generated text back to its original SourcePos.
    • originalSpan

      SourceSpan originalSpan(int generatedStart, int generatedEnd)
      Map a half-open range [generatedStart, generatedEnd) in the generated text back to an original SourceSpan.