src/Language/Parser.php
protected function unexpected(Token $atToken = NULL)
    {
        $token = $atToken ?: $this->token;

        return new \Exception(sprintf('Unexpected %s', $token->getDescription()));
    }
protected function unexpected(Token $atToken = NULL)
    {
        $token = $atToken ?: $this->token;

        return new \Exception(sprintf('Unexpected %s', $token->getDescription()));
    }
protected function unexpected ( Token $ atToken = NULL ) { $ token = $ atToken ? : $ this -> token ; return new \ Exception ( sprintf ( 'Unexpected %s' , $ token -> getDescription ( ) ) ) ; }
Helper protected function for creating an error when an unexpected lexed token is
encountered.

@param \Fubhy\GraphQL\Language\Token|null $atToken

@return \Exception
Helper protected function for creating an error when an unexpected lexed token is encountered .