BufferCursor

interface BufferCursor

Abstraction for iterating over a tree buffer. A cursor initially points at the very last element in the buffer. Every time next is called it moves on to the previous one.

Properties

Link copied to clipboard
abstract val end: Int

The end position of the next node.

Link copied to clipboard
abstract val id: Int

The node ID of the next node in the buffer.

Link copied to clipboard
abstract val pos: Int

The current buffer position (four times the number of nodes remaining).

Link copied to clipboard
abstract val size: Int

The size of the next node.

Link copied to clipboard
abstract val start: Int

The start position of the next node in the buffer.

Functions

Link copied to clipboard
abstract fun fork(): BufferCursor

Create a copy of this cursor.

Link copied to clipboard
abstract fun next()

Moves pos down by 4.