advance method
Advance till reach distance
, return the token at original position.
Implementation
Token advance([int distance = 1]) {
final previous = curTok;
for (var i = distance; i > 0; --i) {
curTok = curTok.next ?? endOfFile;
line = curTok.line;
column = curTok.column;
}
return previous;
}