private function consumeWhiteSpace()
{
do {
while (preg_match('/\\s/isSu', $this->peek()) === 1) {
$this->consume(1);
}
if ($this->oParserSettings->bLenientParsing) {
try {
$bHasComment = $this->consumeComment();
} catch (UnexpectedTokenException $e) {
// When we can’t find the end of a comment, we assume the document is finished.
$this->iCurrentPosition = $this->iLength;
return;
}
} else {
$bHasComment = $this->consumeComment();
}
} while ($bHasComment);
}