Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(169373)

Side by Side Diff: Lib/idlelib/HyperParser.py

Issue 16819: IDLE b"" method completion incorrect
Patch Set: Created 6 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """ 1 """
2 HyperParser 2 HyperParser
3 =========== 3 ===========
4 This module defines the HyperParser class, which provides advanced parsing 4 This module defines the HyperParser class, which provides advanced parsing
5 abilities for the ParenMatch and other extensions. 5 abilities for the ParenMatch and other extensions.
6 The HyperParser uses PyParser. PyParser is intended mostly to give information 6 The HyperParser uses PyParser. PyParser is intended mostly to give information
7 on the proper indentation of code. HyperParser gives some information on the 7 on the proper indentation of code. HyperParser gives some information on the
8 structure of code, used by extensions to help the user. 8 structure of code, used by extensions to help the user.
9 """ 9 """
10 10
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 pos = bracketing[brck_index][0] 225 pos = bracketing[brck_index][0]
226 brck_index -= 1 226 brck_index -= 1
227 brck_limit = bracketing[brck_index][0] 227 brck_limit = bracketing[brck_index][0]
228 last_identifier_pos = pos 228 last_identifier_pos = pos
229 if rawtext[pos] in "([": 229 if rawtext[pos] in "([":
230 # [] and () may be used after an identifier, so we 230 # [] and () may be used after an identifier, so we
231 # continue. postdot_phase is True, so we don't allow a dot. 231 # continue. postdot_phase is True, so we don't allow a dot.
232 pass 232 pass
233 else: 233 else:
234 # We can't continue after other types of brackets 234 # We can't continue after other types of brackets
235 if rawtext[pos] in "'\"":
236 # Scan a string prefix
237 while pos > 0 and rawtext[pos - 1] in "rRbBuU":
238 pos -= 1
239 last_identifier_pos = pos
235 break 240 break
236 241
237 else: 242 else:
238 # We've found an operator or something. 243 # We've found an operator or something.
239 break 244 break
240 245
241 return rawtext[last_identifier_pos:self.indexinrawtext] 246 return rawtext[last_identifier_pos:self.indexinrawtext]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+