Automattic\WooCommerce\Vendor\Sabberworm\CSS\Parsing
ParserState::consumeComment
Method of the class: ParserState{}
No Hooks.
Returns
Comment|false.
Usage
$ParserState = new ParserState(); $ParserState->consumeComment();
ParserState::consumeComment() ParserState::consumeComment code WC 10.5.0
public function consumeComment()
{
$mComment = false;
if ($this->comes('/*')) {
$iLineNo = $this->iLineNo;
$this->consume(1);
$mComment = '';
while (($char = $this->consume(1)) !== '') {
$mComment .= $char;
if ($this->comes('*/')) {
$this->consume(2);
break;
}
}
}
if ($mComment !== false) {
// We skip the * which was included in the comment.
return new Comment(substr($mComment, 1), $iLineNo);
}
return $mComment;
}