Lines Matching defs:Position
198 """Does a reverse find starting at start position and going backwards until
201 Returns the position where the regex ended.
213 return Position(current_row, found_match.end(1))
367 class Position(object):
368 """Holds the position of something."""
482 start_position = Position(row=start_position.row, column=start_position.column + 1)
483 end_position = Position(row=end_position.row, column=end_position.column - 1)
523 self.body_start_position = Position(-1000, 0)
524 self.end_position = Position(-1000, 0)
532 function_name_start_position: Position in elided where the function name starts.
533 body_start_position: Position in elided of the { or the ; for a prototype.
534 end_position: Position in elided just after the final } (or ; is.
535 parameter_start_position: Position in elided of the '(' for the parameters.
536 parameter_end_position: Position in elided just after the ')' for the parameters.
558 # ';' or '{' or '}' or 'private:', etc. or '#' or return Position(0, 0)
561 elided, self.parameter_start_position, Position(0, 0))
840 def close_expression(elided, position):
841 """If input points to ( or { or [, finds the position that closes it.
843 If elided[position.row][position.column] points to a '(' or '{' or '[',
848 position: The position of the opening item.
851 The Position *past* the closing brace, or Position(len(elided), -1)
854 line = elided[position.row]
855 start_character = line[position.column]
863 return Position(len(elided), -1)
865 current_column = position.column + 1
866 line_number = position.row
868 for line in elided[position.row:]:
884 return Position(line_number, current_column)
891 return Position(len(elided), -1)
1469 body_start_position = Position(start_line_number, body_match.start(0))
1481 function_name_start_position = Position(line_number, match_function.start(1))
1490 parameter_start_position = Position(line_number, match_function.end(1))
1497 end_position = Position(body_start_position.row, body_start_position.column + 1)