Lines Matching refs:pos
149 # Given a string and pos, return the number of chars in the identifier
150 # which ends at pos, or 0 if there is no such one. Saved words are not
152 def _eat_identifier(self, str, limit, pos):
153 i = pos
156 if i < pos and (str[i] not in self._id_first_chars or \
157 keyword.iskeyword(str[i:pos])):
158 i = pos
159 return pos - i
174 pos = self.indexinrawtext
176 last_identifier_pos = pos
182 if pos>brck_limit and rawtext[pos-1] in self._whitespace_chars:
184 pos -= 1
186 pos > brck_limit and rawtext[pos-1] == '.':
188 pos -= 1
192 elif pos == brck_limit and brck_index > 0 and \
197 pos = bracketing[brck_index+1][0]
204 # identifier pos.
207 ret = self._eat_identifier(rawtext, brck_limit, pos)
210 pos = pos - ret
211 last_identifier_pos = pos
216 elif pos == brck_limit:
225 pos = bracketing[brck_index][0]
228 last_identifier_pos = pos
229 if rawtext[pos] in "([":
235 if rawtext[pos] in "'\"":
237 while pos > 0 and rawtext[pos - 1] in "rRbBuU":
238 pos -= 1
239 last_identifier_pos = pos