void next() {
        while (input.hasNext()) {
            final char currentCharacter = input.next();

            // Must be befor whitespace check, because \n is also whitespace
            if ('\n' == currentCharacter) {
                if (scanNewline()) {
                    continue;
                }

                return;
            }

            if (CharacterHelper.isWhiteSpace(currentCharacter)) {
                continue; // ignore white spaces
            }

            if (CharacterHelper.isAlpha(currentCharacter)) {
                scanKeywordOrLiteral();
                return;
            }

            if (CharacterHelper.isNum(currentCharacter)) {
                scanNumber();
                return;
            }

            if (CharacterHelper.isDoubleQuote(currentCharacter)) {
                scanString();
                return;
            }

            if ('/' == currentCharacter) {
                scanCommentOrOperator();
                return;
            }

            if (CharacterHelper.isOperator(currentCharacter)) {
                scanOperator();
                return;
            }
        }
        currentToken = Tokens.newEndOfFileToken(createPosition());
    }