fn parse_interface_type_extension(&mut self) -> ParseResult<InterfaceTypeExtension> {
        // `extend interface` 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(
                "Interface extension should define one of interfaces, directives or fields.",
                Location::new(self.source_location, name.span),
            ));
            return Err(());
        }
        Ok(InterfaceTypeExtension {
            name,
            interfaces,
            directives,
            fields,
        })
    }
/**
     * InterfaceTypeExtension :
     *   - extend interface Name ImplementsInterfaces? DirectivesConst? FieldsDefinition
     *   - extend interface Name ImplementsInterfaces? DirectivesConst
     *   - extend interface Name ImplementsInterfaces
     */
InterfaceTypeExtension :
- extend interface Name ImplementsInterfaces.
InterfaceTypeExtension : - extend interface Name ImplementsInterfaces .
fn parse_interface_type_extension(&mut self) -> ParseResult<InterfaceTypeExtension> {
        // `extend interface` 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(
                "Interface extension should define one of interfaces, directives or fields.",
                Location::new(self.source_location, name.span),
            ));
            return Err(());
        }
        Ok(InterfaceTypeExtension {
            name,
            interfaces,
            directives,
            fields,
        })
    }
fn parse_interface_type_extension ( & mut self ) -> ParseResult < InterfaceTypeExtension > { // `extend interface` 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 ( InterfaceTypeExtension { name , interfaces , directives , fields , } ) }
InterfaceTypeExtension :
   - extend interface Name ImplementsInterfaces?
InterfaceTypeExtension : - extend interface Name ImplementsInterfaces?
&mut self
&mut self