private function parseExecutableDefinition()
    {
        if ($this->peek(Token::NAME)) {
            switch ($this->lexer->token->value) {
                case 'query':
                case 'mutation':
                case 'subscription':
                    return $this->parseOperationDefinition();
                case 'fragment':
                    return $this->parseFragmentDefinition();
            }
        } elseif ($this->peek(Token::BRACE_L)) {
            return $this->parseOperationDefinition();
        }

        throw $this->unexpected();
    }
private function parseExecutableDefinition()
    {
        if ($this->peek(Token::NAME)) {
            switch ($this->lexer->token->value) {
                case 'query':
                case 'mutation':
                case 'subscription':
                    return $this->parseOperationDefinition();
                case 'fragment':
                    return $this->parseFragmentDefinition();
            }
        } elseif ($this->peek(Token::BRACE_L)) {
            return $this->parseOperationDefinition();
        }

        throw $this->unexpected();
    }
private function parseExecutableDefinition ( ) { if ( $ this -> peek ( Token :: NAME ) ) { switch ( $ this -> lexer -> token -> value ) { case 'query' : case 'mutation' : case 'subscription' : return $ this -> parseOperationDefinition ( ) ; case 'fragment' : return $ this -> parseFragmentDefinition ( ) ; } } elseif ( $ this -> peek ( Token :: BRACE_L ) ) { return $ this -> parseOperationDefinition ( ) ; } throw $ this -> unexpected ( ) ; }
@return ExecutableDefinitionNode

@throws SyntaxError
@return ExecutableDefinitionNode