Some reorg and Lame attempt to disasmbiguate "and" and "if .. if"...

More work is needed.
This commit is contained in:
rocky
2020-01-08 10:31:19 -05:00
parent 24f59546fe
commit 13d9bcaaa9
6 changed files with 112 additions and 50 deletions

View File

@@ -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