pyrser/parsing/base.py
def read_until(self, c: str, inhibitor='\\') -> bool:
        """
        Consume the stream while the c byte is not read, else return false
        ex : if stream is " abcdef ", read_until("d"); consume "abcd".
        """
        if self.read_eof():
            return False
        self._stream.save_context()
        while not self.read_eof():
            if self.peek_char(inhibitor):
                # Delete inhibitor and inhibited character
                self.one_char()
                self.one_char()
            if self.peek_char(c):
                self._stream.incpos()
                return self._stream.validate_context()
            self._stream.incpos()
        return self._stream.restore_context()
def read_until(self, c: str, inhibitor='\\') -> bool:
        """
        Consume the stream while the c byte is not read, else return false
        ex : if stream is " abcdef ", read_until("d"); consume "abcd".
        """
        if self.read_eof():
            return False
        self._stream.save_context()
        while not self.read_eof():
            if self.peek_char(inhibitor):
                # Delete inhibitor and inhibited character
                self.one_char()
                self.one_char()
            if self.peek_char(c):
                self._stream.incpos()
                return self._stream.validate_context()
            self._stream.incpos()
        return self._stream.restore_context()
def read_until ( self , c : str , inhibitor = '\\' ) -> bool : if self . read_eof ( ) : return False self . _stream . save_context ( ) while not self . read_eof ( ) : if self . peek_char ( inhibitor ) : # Delete inhibitor and inhibited character self . one_char ( ) self . one_char ( ) if self . peek_char ( c ) : self . _stream . incpos ( ) return self . _stream . validate_context ( ) self . _stream . incpos ( ) return self . _stream . restore_context ( )
Consume the stream while the c byte is not read, else return false
        ex : if stream is " abcdef ", read_until("d"); consume "abcd".
Consume the stream while the c byte is not read else return false ex : if stream is abcdef read_until ( d ) ; consume abcd .