public function isNextOpenerOrWord() : bool
    {
        $token = current($this->tokens);

        if ($token === false) {
            throw new GeometryIOException("Expected '(' or word but encountered end of stream");
        }

        if ($token[1] === '(') {
            return true;
        }

        if ($token[0] === static::T_WORD) {
            return false;
        }

        throw new GeometryIOException("Expected '(' or word but encountered '" . $token[1] . "'");
    }
public function isNextOpenerOrWord() : bool
    {
        $token = current($this->tokens);

        if ($token === false) {
            throw new GeometryIOException("Expected '(' or word but encountered end of stream");
        }

        if ($token[1] === '(') {
            return true;
        }

        if ($token[0] === static::T_WORD) {
            return false;
        }

        throw new GeometryIOException("Expected '(' or word but encountered '" . $token[1] . "'");
    }
public function isNextOpenerOrWord ( ) : bool { $ token = current ( $ this -> tokens ) ; if ( $ token === false ) { throw new GeometryIOException ( "Expected '(' or word but encountered end of stream" ) ; } if ( $ token [ 1 ] === '(' ) { return true ; } if ( $ token [ 0 ] === static :: T_WORD ) { return false ; } throw new GeometryIOException ( "Expected '(' or word but encountered '" . $ token [ 1 ] . "'" ) ; }
Returns whether the next token is an opener or a word.

@return bool True if the next token is an opener, false if it is a word.

@throws GeometryIOException If the next token is not an opener or a word, or if there is no next token.
Returns whether the next token is an opener or a word .