public void requireWhitespace() {
        if (!isWhitespace())
            throw new IllegalArgumentException("Expected whitespace, but got " + current());
        i++;
    }
Returns the current token if it is any element and throws otherwise.
integration/intellij/src/main/java/ai/vespa/intellij/schema/utils/Tokens.java