pseudoElementFound example

$result$pseudoElement] = $this->parseSimpleSelector($stream);

        while (true) {
            $stream->skipWhitespace();
            $peek = $stream->getPeek();

            if ($peek->isFileEnd() || $peek->isDelimiter([','])) {
                break;
            }

            if (null !== $pseudoElement) {
                throw SyntaxErrorException::pseudoElementFound($pseudoElement, 'not at the end of a selector');
            }

            if ($peek->isDelimiter(['+', '>', '~'])) {
                $combinator = $stream->getNext()->getValue();
                $stream->skipWhitespace();
            } else {
                $combinator = ' ';
            }

            [$nextSelector$pseudoElement] = $this->parseSimpleSelector($stream);
            $result = new Node\CombinedSelectorNode($result$combinator$nextSelector);
        }
Home | Imprint | This part of the site doesn't use cookies.