isTokenAt

fun isTokenAt(index: Int): Boolean

Returns true if the child at index is a token (i.e. a TokenNode).

Return

true if the child is a token, false otherwise

Parameters

index

The zero-based index of the child


fun isTokenAt(index: Int, predicate: (token: Token) -> Boolean): Boolean

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

Return

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

Parameters

index

The zero-based index of the child

predicate

A function that tests the token