public peek() as Token
Returns the current token without advancing the cursor, or null at end of stream.
Current Token or null.
import klyn.code import klyn.code.klyn cursor = SourceTokenCursor.fromSource(KlynTokenizer(), "return 42") assert cursor.peek().text == "return"