You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Possibly linemap improvements
This commit is contained in:
@@ -27,6 +27,13 @@ class LineMapWalker(SourceWalker):
|
||||
self.source_linemap[self.current_line_number] = node.linestart
|
||||
return super(LineMapWalker, self).default(node)
|
||||
|
||||
def n_LOAD_CONST(self, node):
|
||||
if hasattr(node, 'linestart'):
|
||||
if node.linestart:
|
||||
self.source_linemap[self.current_line_number] = node.linestart
|
||||
return super(LineMapWalker, self).n_LOAD_CONST(node)
|
||||
|
||||
|
||||
class LineMapFragmentWalker(fragments.FragmentsWalker, LineMapWalker):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(LineMapFragmentWalker, self).__init__(*args, **kwargs)
|
||||
|
Reference in New Issue
Block a user