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
- Alphabetic
- By Inheritance
- SourcePosition
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(i: Int): SourcePosition
the position that is i places later in the same line
-
def
-(that: SourcePosition): Int
the difference between two position
-
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
- def <=(that: SourcePosition): Boolean
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
after(s: String): SourcePosition
the position after the string s, which starts at the current position (s may contain newlines)
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val column: Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val line: Int
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nl: SourcePosition
the position that is 1 places later at the beginning of the the next line
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val offset: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toRegion: SourceRegion
the SourceRegion of lenght 1 at this SourcePosition
-
def
toString(): String
inverse of SourcePosition.parse
inverse of SourcePosition.parse
- Definition Classes
- SourcePosition → AnyRef → Any
- def twoDimString: String
-
def
twoDimStringFromOne: String
same as twoDimString but columns and rows are counted from 1, not 0
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()