summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/compiler/astgen.py2
-rw-r--r--Tools/compiler/compiler/astgen.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/Tools/compiler/astgen.py b/Tools/compiler/astgen.py
index c31ca54..fc92993 100644
--- a/Tools/compiler/astgen.py
+++ b/Tools/compiler/astgen.py
@@ -171,6 +171,8 @@ class Node:
return flatten(self._getChildren())
def asList(self):
return tuple(asList(self.getChildren()))
+ def getChildNodes(self):
+ return [n for n in self.getChildnre() if isinstance(n, Node)]
class EmptyNode(Node):
def __init__(self):
diff --git a/Tools/compiler/compiler/astgen.py b/Tools/compiler/compiler/astgen.py
index c31ca54..fc92993 100644
--- a/Tools/compiler/compiler/astgen.py
+++ b/Tools/compiler/compiler/astgen.py
@@ -171,6 +171,8 @@ class Node:
return flatten(self._getChildren())
def asList(self):
return tuple(asList(self.getChildren()))
+ def getChildNodes(self):
+ return [n for n in self.getChildnre() if isinstance(n, Node)]
class EmptyNode(Node):
def __init__(self):