Lines Matching refs:col
71 msg, col = what
74 col = -1
75 self.report_error(pat, msg, col)
79 def report_error(self, pat, msg, col=-1):
84 if col >= 0:
85 msg = msg + "\nOffset: " + str(col)
125 line, col = get_line_col(start)
126 res = self.search_backward(text, prog, line, col, wrap, ok)
132 line, col = get_line_col(start)
133 res = self.search_forward(text, prog, line, col, wrap, ok)
136 def search_forward(self, text, prog, line, col, wrap, ok=0):
141 m = prog.search(chars[:-1], col)
143 if ok or m.end() > col:
148 col = 0
158 def search_backward(self, text, prog, line, col, wrap, ok=0):
163 m = search_reverse(prog, chars[:-1], col)
165 if ok or m.start() < col:
177 line, col = map(int, pos.split("."))
179 col = len(chars) - 1
185 def search_reverse(prog, chars, col):
191 while i < col and j <= col:
202 # Return a tuple of indices ("line.col" strings).
216 # Helper to parse a text index into a (line, col) tuple.
219 line, col = map(int, index.split(".")) # Fails on invalid index
220 return line, col