protected function validateAttributeOperator(TokenStream $stream, $attr): void
    {
        if (!$stream->test(Token::OPERATOR_TYPE, '=')) {
            throw new SyntaxError(sprintf('The attribute "%s" must be followed by "=" operator', $attr), $stream->getCurrent()->getLine(), $stream->getSourceContext());
        }
    }
protected function validateAttributeOperator(TokenStream $stream, $attr): void
    {
        if (!$stream->test(Token::OPERATOR_TYPE, '=')) {
            throw new SyntaxError(sprintf('The attribute "%s" must be followed by "=" operator', $attr), $stream->getCurrent()->getLine(), $stream->getSourceContext());
        }
    }
protected function validateAttributeOperator ( TokenStream $ stream , $ attr ) : void { if ( ! $ stream -> test ( Token :: OPERATOR_TYPE , '=' ) ) { throw new SyntaxError ( sprintf ( 'The attribute "%s" must be followed by "=" operator' , $ attr ) , $ stream -> getCurrent ( ) -> getLine ( ) , $ stream -> getSourceContext ( ) ) ; } }
Validate the current attribute operator.

@param TokenStream $stream The token stream
@param string      $attr   The attribute name

@throws SyntaxError When the attribute is not following by "="
Validate the current attribute operator .