Position

laika.parse.Position
class Position(s: InputString, offset: Int)

Represents an offset into a source string. Its main purpose is error reporting, e.g. printing a visual representation of the line containing the error.

Attributes

offset

the offset into the source string

s

the source for this position

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

The contents of the line at the current offset, decorated with a caret indicating the column. Example:

The contents of the line at the current offset, decorated with a caret indicating the column. Example:

 The content of the current line with a caret under the c.
     ^

Attributes

Concrete fields

lazy val column: Int

The column number referred to by this position, starting at 1.

The column number referred to by this position, starting at 1.

Attributes

lazy val line: Int

The line number referred to by this position, starting at 1.

The line number referred to by this position, starting at 1.

Attributes

lazy val lineContent: String

The contents of the line at the current offset (not including a newline).

The contents of the line at the current offset (not including a newline).

Attributes

val source: String
lazy override val toString: String

A string representation of this Position of the form line.column.

A string representation of this Position of the form line.column.

Attributes