CstCursor

io.eleven19.krueger.cst.CstCursor
See theCstCursor companion object
final case class CstCursor

A zipper-style cursor for navigating the CST. Tracks the current node and its position within the tree, allowing movement to parent, children, and siblings without re-traversing from the root.

Attributes

Companion
object
Source
CstCursor.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def children: List[CstNode]

The direct children of the current node.

The direct children of the current node.

Attributes

Source
CstCursor.scala
def depth: Int

Depth of this cursor in the tree (0 = root).

Depth of this cursor in the tree (0 = root).

Attributes

Source
CstCursor.scala
def firstChild: Option[CstCursor]

Move to the first child, if any.

Move to the first child, if any.

Attributes

Source
CstCursor.scala
def isLeaf: Boolean

True if this cursor has no children.

True if this cursor has no children.

Attributes

Source
CstCursor.scala
def isRoot: Boolean

True if this cursor is at the root of the tree.

True if this cursor is at the root of the tree.

Attributes

Source
CstCursor.scala
def lastChild: Option[CstCursor]

Move to the last child, if any.

Move to the last child, if any.

Attributes

Source
CstCursor.scala
def nextSibling: Option[CstCursor]

Move to the next sibling, if any.

Move to the next sibling, if any.

Attributes

Source
CstCursor.scala
def parent: Option[CstCursor]

Move to the parent node, if any.

Move to the parent node, if any.

Attributes

Source
CstCursor.scala
def preOrder: LazyList[CstCursor]

Walk the tree depth-first, pre-order, starting from this cursor.

Walk the tree depth-first, pre-order, starting from this cursor.

Attributes

Source
CstCursor.scala
def previousSibling: Option[CstCursor]

Move to the previous sibling, if any.

Move to the previous sibling, if any.

Attributes

Source
CstCursor.scala

Return the root node by walking up from the current position.

Return the root node by walking up from the current position.

Attributes

Source
CstCursor.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala