1
0
forked from VimPlug/jedi

The backwards tokenizer sometimes parsed not only string literals but also normal names.

This commit is contained in:
Dave Halter
2015-04-28 18:10:08 +02:00
parent c2a287c25a
commit 607f43290f
2 changed files with 9 additions and 1 deletions

View File

@@ -104,7 +104,8 @@ class UserContext(object):
# The same is true for string prefixes -> represented as a
# combination of string and name.
if tok_type == tokenize.NUMBER and tok_str[-1] == '.' \
or tok_type == tokenize.NAME and last_type == tokenize.STRING:
or tok_type == tokenize.NAME and last_type == tokenize.STRING \
and tok_str.lower() in ('b', 'u', 'r', 'br', 'ur'):
force_point = False
else:
break