def token_or_comment_or_line_generator(buffer):
tok_or_com_gen = token_or_comment_generator(buffer)<EOL>line_gen = line_generator(buffer)<EOL>tok_or_com = next(tok_or_com_gen, None)<EOL>line = next(line_gen, None)<EOL>while tok_or_com is not None or line is not None:<EOL><INDENT>if tok_or_com is None or (line is not None and<EOL>tok_or_com.line_no > line.line_no):<EOL><INDENT>yield line<EOL>line = next(line_gen, None)<EOL><DEDENT>else:<EOL><INDENT>yield tok_or_com<EOL>tok_or_com = next(tok_or_com_gen, None)<EOL><DEDENT><DEDENT>
Generator that mixes tokens and lines, ordering them by line number