(self, ins)
return whilepos, wendpos
Helper function for WHILE: find matching WEND.
Helper function for WHILE: find matching WEND.
Helper function for WHILE : find matching WEND .
def _find_wend(self, ins):
        """Helper function for WHILE: find matching WEND."""
        # just after WHILE token
        whilepos = ins.tell()
        ins.skip_block(tk.WHILE, tk.WEND)
        if ins.read(1) != tk.WEND:
            # WHILE without WEND
            ins.seek(whilepos)
            raise error.BASICError(error.WHILE_WITHOUT_WEND)
        ins.skip_to(tk.END_STATEMENT)
        wendpos = ins.tell()
        ins.seek(whilepos)
        return whilepos, wendpos
def _find_wend ( self , ins ) : # just after WHILE token whilepos = ins . tell ( ) ins . skip_block ( tk . WHILE , tk . WEND ) if ins . read ( 1 ) != tk . WEND : # WHILE without WEND ins . seek ( whilepos ) raise error . BASICError ( error . WHILE_WITHOUT_WEND ) ins . skip_to ( tk . END_STATEMENT ) wendpos = ins . tell ( ) ins . seek ( whilepos ) return whilepos , wendpos