dotty.tools.dotc.util.Positions

Position

Related Doc: package Positions

final class Position extends AnyVal

A position indicates a range between a start offset and an end offset. Positions can be synthetic or source-derived. A source-derived position has in addition a point lies somewhere between start and end. The point is roughly where the ^ would go if an error was diagnosed at that position. All quantities are encoded opaquely in a Long.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Position
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Position(coords: Long)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def contains(that: Position): Boolean

    Does the range of this position contain the one of that position?

  6. val coords: Long

  7. def end: Int

    The end of this position

  8. def endPos: Position

    The zero-extent position with start and end at the end of this position

  9. def exists: Boolean

    Is this position different from NoPosition?

  10. def focus: Position

    The zero-extent position with start and end at the point of this position

  11. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  12. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  13. def isSourceDerived: Boolean

    Is this position source-derived?

  14. def isSynthetic: Boolean

    Is this position synthetic?

  15. def orElse(that: Position): Position

  16. def point: Int

    The point of this position, returns start for synthetic positions

  17. def pointDelta: Int

    The difference between point and start in this position

  18. def shift(offset: Int): Position

    A position where all components are shifted by a given offset relative to this position.

  19. def start: Int

    The start of this position.

  20. def startPos: Position

    The zero-extent position with start and end at the start of this position

  21. def toString(): String

    Definition Classes
    Position → Any
  22. def toSynthetic: Position

    A synthetic copy of this position

  23. def union(that: Position): Position

    The union of two positions.

    The union of two positions. This is the least range that encloses both positions. It is always a synthetic position.

  24. def withEnd(end: Int): Position

    A copy of this position with a different end

  25. def withPoint(point: Int): Position

    A copy of this position with a different point

  26. def withStart(start: Int): Position

    A copy of this position with a different start

Inherited from AnyVal

Inherited from Any

Ungrouped