Get the next valid non-"\\#" character that satisfies the `stop` predicate
(lineno, col, stop)
| 876 | return lineno, col |
| 877 | |
| 878 | def increment_until(lineno, col, stop): |
| 879 | """Get the next valid non-"\\#" character that satisfies the `stop` predicate""" |
| 880 | while True: |
| 881 | ch = lines[lineno][col] |
| 882 | if ch in "\\#": |
| 883 | lineno, col = nextline(lineno, col) |
| 884 | elif not stop(ch): |
| 885 | lineno, col = increment(lineno, col) |
| 886 | else: |
| 887 | break |
| 888 | return lineno, col |
| 889 | |
| 890 | def setup_positions(expr, force_valid=True): |
| 891 | """Get the lineno/col position of the end of `expr`. If `force_valid` is True, |
no test coverage detected