RelaxedPosition

scala.io.Source.RelaxedPosition

A Position implementation which ignores errors in the positions.

Attributes

Source
Source.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Source.this.Source.this.RelaxedPosition.type

Members list

Value members

Concrete methods

def checkInput(line: Int, column: Int): Unit

Definable behavior for overflow conditions.

Definable behavior for overflow conditions.

Value parameters

column

the 1-based column number to validate (must be 0 when line is 0, negative values throw)

line

the 1-based line number to validate (0 for undefined, negative values throw)

Attributes

Source
Source.scala

Inherited methods

final def column(pos: Int): Int

Returns the column number of the encoded position.

Returns the column number of the encoded position.

Value parameters

pos

the encoded position as returned by encode

Attributes

Inherited from:
Position (hidden)
Source
Position.scala
final def encode(line: Int, column: Int): Int

Encodes a position into a single integer.

Encodes a position into a single integer.

Value parameters

column

the 1-based column number, or 0 for undefined; clamped to COLUMN_MASK, ignored when line >= LINE_MASK

line

the 1-based line number, or 0 for undefined; values at or above LINE_MASK are clamped and the column is set to 0

Attributes

Inherited from:
Position (hidden)
Source
Position.scala
final def line(pos: Int): Int

Returns the line number of the encoded position.

Returns the line number of the encoded position.

Value parameters

pos

the encoded position as returned by encode

Attributes

Inherited from:
Position (hidden)
Source
Position.scala
def toString(pos: Int): String

Returns a string representation of the encoded position.

Returns a string representation of the encoded position.

Value parameters

pos

the encoded position as returned by encode

Attributes

Inherited from:
Position (hidden)
Source
Position.scala

Inherited fields

final val COLUMN_BITS: 11

Number of bits used to encode the column number.

Number of bits used to encode the column number.

Attributes

Inherited from:
Position (hidden)
Source
Position.scala
final val COLUMN_MASK: 2047

Mask to decode the column number.

Mask to decode the column number.

Attributes

Inherited from:
Position (hidden)
Source
Position.scala
final val LINE_BITS: 20

Number of bits used to encode the line number.

Number of bits used to encode the line number.

Attributes

Inherited from:
Position (hidden)
Source
Position.scala
final val LINE_MASK: 1048575

Mask to decode the line number.

Mask to decode the line number.

Attributes

Inherited from:
Position (hidden)
Source
Position.scala