|
Scala Library
|
|
scala/util/parsing/input/Position.scala]
trait
Position
extends AnyRef
Position is the base trait for objects describing a
position in a ``document''.
It provides functionality for:
To use this class for a concrete kind of ``document'', implement the
lineContents method.
| Method Summary | |
def
|
<
(that : Position) : Boolean
Compare this position to another, by first comparing their line numbers,
and then -- if necessary -- using the columns to break a tie.
|
abstract def
|
column
: Int
The column number referred to by the position; column numbers start at 1
|
abstract def
|
line
: Int
The line number referred to by the position; line numbers start at 1
|
protected abstract def
|
lineContents
: java.lang.String
The contents of the line numbered `lnum' (must not contain a new-line character).
|
def
|
longString
: java.lang.String
Returns a more ``visual'' representation of this position.
More precisely, the resulting string consists of two lines:
List(this, is, a, line, from, the, document)
^ |
override def
|
toString
: java.lang.String
Returns a string representation of the `Position', of the form `line.column'
|
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Method Details |
abstract
def
line : Int
abstract
def
column : Int
protected abstract
def
lineContents : java.lang.String
lnum - a 1-based integer index into the `document'override
def
toString : java.lang.String
def
longString : java.lang.String
List(this, is, a, line, from, the, document)
^`that' - a `Position' to compare to this `Position'|
Scala Library
|
|