def nextline(self):
linebuf = b'<STR_LIT>'<EOL>linepos = self.bufpos + self.charpos<EOL>eol = False<EOL>while <NUM_LIT:1>:<EOL><INDENT>self.fillbuf()<EOL>if eol:<EOL><INDENT>c = self.buf[self.charpos]<EOL>if c == b'<STR_LIT:\n>':<EOL><INDENT>linebuf += c<EOL>self.charpos += <NUM_LIT:1><EOL><DEDENT>break<EOL><DEDENT>m = EOL.search(self.buf, self.charpos)<EOL>if m:<EOL><INDENT>linebuf += self.buf[self.charpos:m.end(<NUM_LIT:0>)]<EOL>self.charpos = m.end(<NUM_LIT:0>)<EOL>if linebuf[-<NUM_LIT:1>] == b'<STR_LIT:\r>':<EOL><INDENT>eol = True<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>linebuf += self.buf[self.charpos:]<EOL>self.charpos = len(self.buf)<EOL><DEDENT><DEDENT>if self.debug:<EOL><INDENT>logging.debug('<STR_LIT>' % (linepos, linebuf))<EOL><DEDENT>return (linepos, linebuf)<EOL>
Fetches a next line that ends either with \\r or \\n.