PositionMapImplementation

open class PositionMapImplementation(val source: CharacterSource, val lineSeparators: IntArray) : PositionMap(source)

Simple implementation of PositionMap

Since

0.2.1

Parameters

source
lineSeparators

the line separators of the PositionMap

Constructors

Link copied to clipboard
constructor(source: CharacterSource, lineSeparators: IntArray)

Properties

Link copied to clipboard
open override val lineSeparators: IntArray
Link copied to clipboard
open override val location: String

The location of the PositionMap

Link copied to clipboard
open override val source: CharacterSource

Functions

Link copied to clipboard
open fun getAfterInLine(index: Int): Int

Get amount of characters after the Position in the line Similar to getAfterInLine but with the index of the Position instead of the Position itself

open override fun getAfterInLine(p: Position): Int

Get amount of characters after the Position in the line

Link copied to clipboard
open fun resolve(index: Int): Position

Resolve the Position of a character from its index

Link copied to clipboard
open override fun toString(): String

Return the String representation of the PositionMap