(self, ins)
Parse SOUND syntax.
Parse SOUND syntax.
Parse SOUND syntax .
def _parse_sound(self, ins):
        """Parse SOUND syntax."""
        command = None
        if self._syntax in ('pcjr', 'tandy'):
            # Tandy/PCjr SOUND ON, OFF
            command = ins.skip_blank_read_if((tk.ON, tk.OFF))
        if command:
            yield command
        else:
            yield self.parse_expression(ins)
            ins.require_read((b',',))
            dur = self.parse_expression(ins)
            yield dur
            # only look for args 3 and 4 if duration is > 0;
            # otherwise those args are a syntax error (on tandy)
            if (dur.sign() == 1) and ins.skip_blank_read_if((b',',)) and self._syntax in ('pcjr', 'tandy'):
                yield self.parse_expression(ins)
                if ins.skip_blank_read_if((b',',)):
                    yield self.parse_expression(ins)
                else:
                    yield None
            else:
                yield None
                yield None
        ins.require_end()
def _parse_sound ( self , ins ) : command = None if self . _syntax in ( 'pcjr' , 'tandy' ) : # Tandy/PCjr SOUND ON, OFF command = ins . skip_blank_read_if ( ( tk . ON , tk . OFF ) ) if command : yield command else : yield self . parse_expression ( ins ) ins . require_read ( ( b',' , ) ) dur = self . parse_expression ( ins ) yield dur # only look for args 3 and 4 if duration is > 0; # otherwise those args are a syntax error (on tandy) if ( dur . sign ( ) == 1 ) and ins . skip_blank_read_if ( ( b',' , ) ) and self . _syntax in ( 'pcjr' , 'tandy' ) : yield self . parse_expression ( ins ) if ins . skip_blank_read_if ( ( b',' , ) ) : yield self . parse_expression ( ins ) else : yield None else : yield None yield None ins . require_end ( )