next method

Token next()

Returns the current token, and scans the next one.

Implementation

Token next() {
  Token t = token!;
  endOffset = t.endOffset;
  token = lexer.scan();
  return t;
}