OffsetAttribute

The start and end character offset of a Token.

Inheritors

Functions

Link copied to clipboard
abstract fun endOffset(): Int

Returns this Token's ending offset, one greater than the position of the last character corresponding to this token in the source text. The length of the token in the source text is ( endOffset() - .startOffset).

Link copied to clipboard
abstract fun setOffset(startOffset: Int, endOffset: Int)

Set the starting and ending offset.

Link copied to clipboard
abstract fun startOffset(): Int

Returns this Token's starting offset, the position of the first character corresponding to this token in the source text.