/**
* Parses next simple node (hash, class, pseudo, negation).
*
* @throws SyntaxErrorException
*/
private function parseSimpleSelector(TokenStream
$stream, bool
$insideNegation = false
): array
{ $stream->
skipWhitespace();
$selectorStart = \
count($stream->
getUsed());
$result =
$this->
parseElementNode($stream);
$pseudoElement = null;
while (true
) { $peek =
$stream->
getPeek();
if ($peek->
isWhitespace() ||
$peek->
isFileEnd() ||
$peek->
isDelimiter([',', '+', '>', '~'
]) || ($insideNegation &&
$peek->
isDelimiter([')'
])) ) { break;
}