src/TokenStream.php
public function nextIf(int $type): bool
    {
        if (!$this->current->typeEquals($type)) {
            return false;
        }

        $this->next();
        return true;
    }
public function nextIf(int $type): bool
    {
        if (!$this->current->typeEquals($type)) {
            return false;
        }

        $this->next();
        return true;
    }
public function nextIf ( int $ type ) : bool { if ( ! $ this -> current -> typeEquals ( $ type ) ) { return false ; } $ this -> next ( ) ; return true ; }
If the current token type matches the given type, move to the next token.
Returns true if next was fired.

@param int $type

@return bool
If the current token type matches the given type move to the next token . Returns true if next was fired .