private Pair<List<SimpleSelector>, PseudoElementSelector> parseSimpleSelectors() {
        int pos = tokenizer.getPosition();

        LinkedList<SimpleSelector> selectorSequence = new LinkedList<>();
        PseudoElementSelector pseudoElement = null;

        boolean empty = true;
        Pair<String, Boolean> name = parseName();
        if (name.second && !"*".equals(name.first)) {
            selectorSequence.add(new LocalNameSelector(name.first));
            empty = false;
        }

        while (true) {
            SimpleSelector selector = parseOneSimpleSelector(false);
            if (selector == null) {
                break;
            }

            if (selector instanceof PseudoElementSelector) {
                empty = false;
                pseudoElement = (PseudoElementSelector) selector;
                break;
            }

            selectorSequence.add(selector);
            empty = false;
        }

        if (empty && !name.second) {
            throw new IllegalArgumentException("No simple selectors found at position " + pos);
        }

        return new Pair<List<SimpleSelector>, PseudoElementSelector>(selectorSequence, pseudoElement);
    }