textOf

abstract fun textOf(token: Token): String

Returns the exact source spelling of token, including original escapes and trivia.


open fun textOf(tokenId: Int): String

Returns the exact source spelling of the token with tokenId.

Throws

if tokenId lies beyond EOF, or outside a materialized source's retained range

if tokenId was already released by a lazy source