Packages

case class SourcePosition(offset: Int, line: Int, column: Int) extends Product with Serializable

position in a source block; both one and two-dimensional coordinates are maintained

offset

one-dimensional coordinate, -1 if omitted

line

vertical two-dimensional coordinate

column

horizontal two-dimensional coordinate all coordinates start from 0 Unicode code points above FFFF count as 2 characters. Arguably that is wrong. But it corresponds to the implementation in Java Strings (see http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#unicode). Therefore, the current source references work better with, e.g., jEdit.

Source
SourceRef.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SourcePosition
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SourcePosition(offset: Int, line: Int, column: Int)

    offset

    one-dimensional coordinate, -1 if omitted

    line

    vertical two-dimensional coordinate

    column

    horizontal two-dimensional coordinate all coordinates start from 0 Unicode code points above FFFF count as 2 characters. Arguably that is wrong. But it corresponds to the implementation in Java Strings (see http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#unicode). Therefore, the current source references work better with, e.g., jEdit.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(i: Int): SourcePosition

    the position that is i places later in the same line

  4. def -(that: SourcePosition): Int

    the difference between two position

  5. def -(i: Int): SourcePosition

    the position that is i places earlier in the same line

    the position that is i places earlier in the same line

    pre: i >= column

  6. def <=(that: SourcePosition): Boolean
  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def after(s: String): SourcePosition

    the position after the string s, which starts at the current position (s may contain newlines)

  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. val column: Int
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. val line: Int
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def nl: SourcePosition

    the position that is 1 places later at the beginning of the the next line

  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. val offset: Int
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toRegion: SourceRegion

    the SourceRegion of lenght 1 at this SourcePosition

  24. def toString(): String

    inverse of SourcePosition.parse

    inverse of SourcePosition.parse

    Definition Classes
    SourcePosition → AnyRef → Any
  25. def twoDimString: String
  26. def twoDimStringFromOne: String

    same as twoDimString but columns and rows are counted from 1, not 0

  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped