src/TokenStream.php
public function lookaheadTypeIs(int $type): bool
    {
        return isset($this->tokens[$this->position]) && $this->tokens[$this->position]->typeEquals($type);
    }
public function lookaheadTypeIs(int $type): bool
    {
        return isset($this->tokens[$this->position]) && $this->tokens[$this->position]->typeEquals($type);
    }
public function lookaheadTypeIs ( int $ type ) : bool { return isset ( $ this -> tokens [ $ this -> position ] ) && $ this -> tokens [ $ this -> position ] -> typeEquals ( $ type ) ; }
Returns true if the lookahead type equals the given type.

@param int $type

@return bool
Returns true if the lookahead type equals the given type .