Remove Python3 class __qualname__ assignment. Change LOAD_NAME to

LOAD_CLASSNAME to make parsing more reliable and intentional.
This commit is contained in:
rocky
2015-12-24 22:31:24 -05:00
parent c0d50c4d96
commit 1088031335
3 changed files with 20 additions and 11 deletions

View File

@@ -682,6 +682,7 @@ class Python3Parser(PythonParser):
have_loadname = False
for i in range(i+1, len(tokens)):
if tokens[i].type == 'LOAD_NAME':
tokens[i].type = 'LOAD_CLASSNAME'
have_loadname = True
break
if tokens[i].type in 'CALL_FUNCTION':
@@ -694,9 +695,10 @@ class Python3Parser(PythonParser):
if tokens[i].type in 'CALL_FUNCTION':
break
assert tokens[i].type == 'LOAD_NAME'
tokens[i].type = 'LOAD_CLASSNAME'
j += 1
pass
load_names = 'LOAD_NAME ' * j
load_names = 'LOAD_CLASSNAME ' * j
else:
j = 0
load_names = ''