private function parseList(CSSList $oList, $bIsRoot = false)
{
while (!$this->isEnd()) {
if ($this->comes('@')) {
$oList->append($this->parseAtRule());
} else {
if ($this->comes('}')) {
$this->consume('}');
if ($bIsRoot) {
throw new \Exception("Unopened {");
} else {
return;
}
} else {
if ($this->oParserSettings->bLenientParsing) {
try {
$oList->append($this->parseSelector());
} catch (UnexpectedTokenException $e) {
}
} else {
$oList->append($this->parseSelector());
}
}
}
$this->consumeWhiteSpace();
}
if (!$bIsRoot) {
throw new \Exception("Unexpected end of document");
}
}