(self, ins)
Parse MID$ syntax.
Parse MID$ syntax.
Parse MID$ syntax .
def _parse_mid(self, ins):
        """Parse MID$ syntax."""
        # do not use require_read as we don't allow whitespace here
        if ins.read(1) != b'(':
            raise error.BASICError(error.STX)
        yield self._parse_variable(ins)
        ins.require_read((b',',))
        yield self.parse_expression(ins)
        if ins.skip_blank_read_if((b',',)):
            yield self.parse_expression(ins)
        else:
            yield None
        ins.require_read((b')',))
        ins.require_read((tk.O_EQ,))
        # we're not using a temp string here
        # as it would delete the new string generated by midset if applied to a code literal
        yield self.parse_expression(ins)
        ins.require_end()
def _parse_mid ( self , ins ) : # do not use require_read as we don't allow whitespace here if ins . read ( 1 ) != b'(' : raise error . BASICError ( error . STX ) yield self . _parse_variable ( ins ) ins . require_read ( ( b',' , ) ) yield self . parse_expression ( ins ) if ins . skip_blank_read_if ( ( b',' , ) ) : yield self . parse_expression ( ins ) else : yield None ins . require_read ( ( b')' , ) ) ins . require_read ( ( tk . O_EQ , ) ) # we're not using a temp string here # as it would delete the new string generated by midset if applied to a code literal yield self . parse_expression ( ins ) ins . require_end ( )