summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/compiler/ast.txt10
-rw-r--r--Tools/compiler/astgen.py5
2 files changed, 11 insertions, 4 deletions
diff --git a/Tools/compiler/ast.txt b/Tools/compiler/ast.txt
index 2f62f55..2ff1223 100644
--- a/Tools/compiler/ast.txt
+++ b/Tools/compiler/ast.txt
@@ -12,8 +12,11 @@
Module: doc*, node
Stmt: nodes!
Decorators: nodes!
-Function: decorators&, name*, argnames*, defaults!, kwonlyargs*, flags*, doc*, code
-Lambda: argnames*, defaults!, kwonlyargs*, flags*, code
+Function: decorators&, name*, arguments!, defaults!, kwonlyargs!, returns&, flags*, doc*, code
+Lambda: arguments!, defaults!, kwonlyargs!, flags*, code
+SimpleArg: name*, annotation&
+NestedArgs: args!
+Kwarg: arg, expr
Class: name*, bases!, doc*, code
Pass:
Break:
@@ -93,9 +96,10 @@ init(Lambda):
self.varargs = 1
if flags & CO_VARKEYWORDS:
self.kwargs = 1
+ self.returns = None
init(GenExpr):
- self.argnames = ['.0']
+ self.arguments = [SimpleArg('.0', None)]
self.varargs = self.kwargs = None
self.kwonlyargs = ()
diff --git a/Tools/compiler/astgen.py b/Tools/compiler/astgen.py
index 26a185b..1485707 100644
--- a/Tools/compiler/astgen.py
+++ b/Tools/compiler/astgen.py
@@ -266,7 +266,10 @@ class Node:
pass # implemented by subclasses
class EmptyNode(Node):
- pass
+ def getChildNodes(self):
+ return ()
+ def getChildren(self):
+ return ()
class Expression(Node):
# Expression is an artificial node class to support "eval"