void () { if (myPosition >= myEndOffset) { myCurrentToken.updateData(myPosition, myPosition, null); return; } boolean tokenFound = false; for (TokenParser tokenParser : myTokenParsers) { if (tokenParser.hasToken(myPosition)) { tokenParser.getTokenInfo(myCurrentToken); if (myCurrentToken.getEnd() <= myCurrentToken.getStart()) { throw new AssertionError(tokenParser); } tokenFound = true; break; } } if (!tokenFound) { handleTokenNotFound(); } myPosition = myCurrentToken.getEnd(); }