Automattic\WooCommerce\Vendor\Sabberworm\CSS\Parsing

ParserState::consumeCommentpublicWC 1.0

Method of the class: ParserState{}

No Hooks.

Returns

Comment|false.

Usage

$ParserState = new ParserState();
$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;
}