isNodeAt

fun isNodeAt(index: Int): Boolean

Returns true if the child at index is a node (excluding TokenNode).

Return

true if the child is a node, false otherwise

Parameters

index

The zero-based index of the child


fun isNodeAt(index: Int, predicate: (node: Node) -> Boolean): Boolean

Returns true if the child at index is a node that satisfies the predicate.

Return

true if the child is a node and satisfies the predicate, false otherwise

Parameters

index

The zero-based index of the child

predicate

A function that tests the node