MCPcopy Index your code
hub / github.com/RustPython/RustPython / increment_until

Function increment_until

Lib/traceback.py:878–888  ·  view source on GitHub ↗

Get the next valid non-"\\#" character that satisfies the `stop` predicate

(lineno, col, stop)

Source from the content-addressed store, hash-verified

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,

Calls 2

nextlineFunction · 0.85
incrementFunction · 0.85

Tested by

no test coverage detected