code: private void next() throws ScanException {
          token = scanner.next();
          while (token == Token.WS) {
              token = scanner.next();
          }
          text = scanner.text();
      }
docs: move to the next token returned by the scanner