Automattic\WooCommerce\Vendor\Sabberworm\CSS\Parsing
ParserState::consumeExpression
Method of the class: ParserState{}
No Hooks.
Returns
String.
Usage
$ParserState = new ParserState(); $ParserState->consumeExpression( $mExpression, $iMaxLength );
- $mExpression(string) (required)
- .
- $iMaxLength(int|null)
- .
Default:null
ParserState::consumeExpression() ParserState::consumeExpression code WC 10.4.3
public function consumeExpression($mExpression, $iMaxLength = null)
{
$aMatches = null;
$sInput = $iMaxLength !== null ? $this->peek($iMaxLength) : $this->inputLeft();
if (preg_match($mExpression, $sInput, $aMatches, PREG_OFFSET_CAPTURE) === 1) {
return $this->consume($aMatches[0][0]);
}
throw new UnexpectedTokenException($mExpression, $this->peek(5), 'expression', $this->iLineNo);
}