You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Some reorg and Lame attempt to disasmbiguate "and" and "if .. if"...
More work is needed.
This commit is contained in:
@@ -60,5 +60,13 @@ class SyntaxTree(spark_AST):
|
||||
child = self[0]
|
||||
if not isinstance(child, SyntaxTree):
|
||||
return child
|
||||
return self[0].first_child()
|
||||
return child.first_child()
|
||||
return self
|
||||
|
||||
def last_child(self):
|
||||
if len(self) > 0:
|
||||
child = self[-1]
|
||||
if not isinstance(child, SyntaxTree):
|
||||
return child
|
||||
return child.last_child()
|
||||
return self
|
||||
|
Reference in New Issue
Block a user