public next() as Token
Returns the current token and advances the cursor to the next token.
Consumed Token, or null if at end of stream.
import klyn.code import klyn.code.klyn cursor = SourceTokenCursor.fromSource(KlynTokenizer(), "return 42") assert cursor.next().text == "return" assert cursor.next().text == "42"