Add class offset of Python3

This commit is contained in:
rocky
2016-06-06 17:26:08 -04:00
parent 70d4841a6a
commit bdfe14069c

View File

@@ -727,6 +727,10 @@ class FragmentsWalker(pysource.SourceWalker, object):
if self.version > 3.0:
currentclass = node[1][0].pattr
buildclass = node[0]
if buildclass[0] == 'LOAD_BUILD_CLASS':
start = len(self.f.getvalue())
self.set_pos_info(buildclass[0], start, start + len('class')+2)
if buildclass[1][0] == 'kwargs':
subclass = buildclass[1][1].attr
subclass_info = node[0]