diff options
-rw-r--r-- | Lib/compiler/ast.py | 12 | ||||
-rw-r--r-- | Tools/compiler/compiler/ast.py | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Lib/compiler/ast.py b/Lib/compiler/ast.py index 4b6fd18..7f29770 100644 --- a/Lib/compiler/ast.py +++ b/Lib/compiler/ast.py @@ -2,6 +2,9 @@ This file is automatically generated. """ +# XXX performance issues: +# 1. getChildren() could be more efficient for many cases + from types import TupleType, ListType from consts import CO_VARARGS, CO_VARKEYWORDS @@ -483,6 +486,15 @@ class Return(Node): def __repr__(self): return "Return(%s)" % (repr(self.value),) +class Yield(Node): + nodes["yield"] = "Yield" + def __init__(self, value): + self.value = value + def _getChildren(self): + return self.value, + def __repr__(self): + return "Yield(%s)" % repr(self.value) + class Add(Node): nodes["add"] = "Add" def __init__(self, (left, right)): diff --git a/Tools/compiler/compiler/ast.py b/Tools/compiler/compiler/ast.py index 4b6fd18..7f29770 100644 --- a/Tools/compiler/compiler/ast.py +++ b/Tools/compiler/compiler/ast.py @@ -2,6 +2,9 @@ This file is automatically generated. """ +# XXX performance issues: +# 1. getChildren() could be more efficient for many cases + from types import TupleType, ListType from consts import CO_VARARGS, CO_VARKEYWORDS @@ -483,6 +486,15 @@ class Return(Node): def __repr__(self): return "Return(%s)" % (repr(self.value),) +class Yield(Node): + nodes["yield"] = "Yield" + def __init__(self, value): + self.value = value + def _getChildren(self): + return self.value, + def __repr__(self): + return "Yield(%s)" % repr(self.value) + class Add(Node): nodes["add"] = "Add" def __init__(self, (left, right)): |