(self, for_char, next_char, allow_comma=False)
Skip over bytecode until block end token.
Skip over bytecode until block end token.
Skip over bytecode until block end token .
def skip_block(self, for_char, next_char, allow_comma=False):
        """Skip over bytecode until block end token."""
        stack = 0
        while True:
            c = self.skip_to_read(tk.END_STATEMENT + (tk.THEN, tk.ELSE))
            # skip line number, if there
            if c == b'\0':
                # break on end of stream
                trail = self.read(4)
                if len(trail) < 4 or trail[:2] == b'\0\0':
                    break
            # get first keyword in statement
            d = self.skip_blank()
            if d == b'':
                break
            elif d == for_char:
                self.read(1)
                stack += 1
            elif d == next_char:
                if stack <= 0:
                    break
                else:
                    self.read(1)
                    stack -= 1
                    # NEXT I, J
                    if allow_comma:
                        while (self.skip_blank() not in tk.END_STATEMENT):
                            self.skip_to(tk.END_STATEMENT + (b',',))
                            if self.peek() == b',':
                                if stack > 0:
                                    self.read(1)
                                    stack -= 1
                                else:
                                    return
def skip_block ( self , for_char , next_char , allow_comma = False ) : stack = 0 while True : c = self . skip_to_read ( tk . END_STATEMENT + ( tk . THEN , tk . ELSE ) ) # skip line number, if there if c == b'\0' : # break on end of stream trail = self . read ( 4 ) if len ( trail ) < 4 or trail [ : 2 ] == b'\0\0' : break # get first keyword in statement d = self . skip_blank ( ) if d == b'' : break elif d == for_char : self . read ( 1 ) stack += 1 elif d == next_char : if stack <= 0 : break else : self . read ( 1 ) stack -= 1 # NEXT I, J if allow_comma : while ( self . skip_blank ( ) not in tk . END_STATEMENT ) : self . skip_to ( tk . END_STATEMENT + ( b',' , ) ) if self . peek ( ) == b',' : if stack > 0 : self . read ( 1 ) stack -= 1 else : return