Dotty Documentation

0.4.0-bin-SNAPSHOT

object Positions

Position format in little endian: Start: unsigned 26 Bits (works for source files up to 64M) End: unsigned 26 Bits Point: unsigned 12 Bits relative to start NoPosition encoded as -1L (this is a normally invalid position because point would lie beyond end.

[-] Constructors

[-] Members

[+] final class Coord

The coordinate of a symbol. This is either an index or a zero-range position.

[+] object Coord

The coordinate of a symbol. This is either an index or a zero-range position.

[+] final class Position

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.

[+] object Position

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.

[+] val MaxOffset : Long

The maximal representable offset in a position

[+] val NoCoord : Coord

A sentinel for a missing coordinate

[+] val NoPosition : Position

A sentinel for a non-existing position

[+] private val StartEndBits : Int
[+] val StartEndMask : Long
[+] private val SyntheticPointDelta : Int
[+] def Position ( start: Int , end: Int ) : Position

A synthetic position with given start and end

[+] def Position ( start: Int , end: Int , point: Int ) : Position

A source-derived position with given start, end, and point delta

[+] def Position ( start: Int ) : Position

A synthetic zero-extent position that starts and ends at given start.

[+] private def fromOffsets ( start: Int , end: Int , pointDelta: Int ) : Position
[+] implicit def indexCoord ( n: Int ) : Coord

An index coordinate

[+] def offsetToInt ( x: Int ) : Int

Convert offset x to an integer by sign extending the original field of StartEndBits width.

[+] implicit def positionCoord ( pos: Position ) : Coord