fn parse_object_type_extension(&mut self) -> ParseResult<ObjectTypeExtension> {
        // `extend type` was parsed before
        let name = self.parse_identifier()?;
        let interfaces = self.parse_implements_interfaces()?;
        let directives = self.parse_constant_directives()?;
        let fields = self.parse_fields_definition()?;
        if interfaces.is_empty() && directives.is_empty() && fields.is_none() {
            self.record_error(Diagnostic::error(
                "Type extension should define one of interfaces, directives or fields.",
                Location::new(self.source_location, name.span),
            ));
            return Err(());
        }
        Ok(ObjectTypeExtension {
            name,
            fields,
            interfaces,
            directives,
        })
    }
/**
     * ObjectTypeExtension :
     *  - extend type Name ImplementsInterfaces? DirectivesConst? FieldsDefinition
     *  - extend type Name ImplementsInterfaces? DirectivesConst
     *  - extend type Name ImplementsInterfaces
     */
ObjectTypeExtension :
- extend type Name ImplementsInterfaces.
ObjectTypeExtension : - extend type Name ImplementsInterfaces .
fn parse_object_type_extension(&mut self) -> ParseResult<ObjectTypeExtension> {
        // `extend type` was parsed before
        let name = self.parse_identifier()?;
        let interfaces = self.parse_implements_interfaces()?;
        let directives = self.parse_constant_directives()?;
        let fields = self.parse_fields_definition()?;
        if interfaces.is_empty() && directives.is_empty() && fields.is_none() {
            self.record_error(Diagnostic::error(
                "Type extension should define one of interfaces, directives or fields.",
                Location::new(self.source_location, name.span),
            ));
            return Err(());
        }
        Ok(ObjectTypeExtension {
            name,
            fields,
            interfaces,
            directives,
        })
    }
fn parse_object_type_extension ( & mut self ) -> ParseResult < ObjectTypeExtension > { // `extend type` was parsed before let name = self . parse_identifier ( ) ? ; let interfaces = self . parse_implements_interfaces ( ) ? ; let directives = self . parse_constant_directives ( ) ? ; let fields = self . parse_fields_definition ( ) ? ; if interfaces . is_empty ( ) && directives . is_empty ( ) && fields . is_none ( ) { self . record_error ( Diagnostic :: error ( " " , Location :: new ( self . source_location , name . span ) , ) ) ; return Err ( ( ) ) ; } Ok ( ObjectTypeExtension { name , fields , interfaces , directives , } ) }
ObjectTypeExtension :
  - extend type Name ImplementsInterfaces?
ObjectTypeExtension : - extend type Name ImplementsInterfaces?
&mut self
&mut self