def event_transition(self, event_cls, event_type, ion_type, value):
        """Returns an ion event event_transition that yields to another co-routine."""
        annotations = self.annotations or ()
        depth = self.depth
        whence = self.whence

        if ion_type is IonType.SYMBOL:
            if not annotations and depth == 0 and isinstance(value, _IVMToken):
                event = value.ivm_event()
                if event is None:
                    _illegal_character(None, self, 'Illegal IVM: %s.' % (value.text,))
                return Transition(event, whence)
            assert not isinstance(value, _IVMToken)

        return Transition(
            event_cls(event_type, ion_type, value, self.field_name, annotations, depth),
            whence
        )
def event_transition ( self , event_cls , event_type , ion_type , value ) : annotations = self . annotations or ( ) depth = self . depth whence = self . whence if ion_type is IonType . SYMBOL : if not annotations and depth == 0 and isinstance ( value , _IVMToken ) : event = value . ivm_event ( ) if event is None : _illegal_character ( None , self , 'Illegal IVM: %s.' % ( value . text , ) ) return Transition ( event , whence ) assert not isinstance ( value , _IVMToken ) return Transition ( event_cls ( event_type , ion_type , value , self . field_name , annotations , depth ) , whence )
Returns an ion event event_transition that yields to another co-routine.