def word_at_position(self, position):
if position['<STR_LIT>'] >= len(self.lines):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>line = self.lines[position['<STR_LIT>']]<EOL>i = position['<STR_LIT>']<EOL>start = line[:i]<EOL>end = line[i:]<EOL>m_start = RE_START_WORD.findall(start)<EOL>m_end = RE_END_WORD.findall(end)<EOL>return m_start[<NUM_LIT:0>] + m_end[-<NUM_LIT:1>]<EOL>
Get the word under the cursor returning the start and end positions.