summaryrefslogtreecommitdiff
path: root/Parser/Python.asdl
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/Python.asdl')
-rw-r--r--Parser/Python.asdl7
1 files changed, 5 insertions, 2 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index a4394c9adf..9a9b933143 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -11,7 +11,7 @@ module Python version "$Revision$"
stmt = FunctionDef(identifier name, arguments args,
stmt* body, expr* decorator_list)
- | ClassDef(identifier name, expr* bases, stmt* body, expr *decorator_list)
+ | ClassDef(identifier name, expr* bases, stmt* body, expr* decorator_list)
| Return(expr? value)
| Delete(expr* targets)
@@ -34,7 +34,7 @@ module Python version "$Revision$"
| Assert(expr test, expr? msg)
| Import(alias* names)
- | ImportFrom(identifier module, alias* names, int? level)
+ | ImportFrom(identifier? module, alias* names, int? level)
-- Doesn't capture requirement that locals must be
-- defined if globals is
@@ -56,7 +56,10 @@ module Python version "$Revision$"
| Lambda(arguments args, expr body)
| IfExp(expr test, expr body, expr orelse)
| Dict(expr* keys, expr* values)
+ | Set(expr* elts)
| ListComp(expr elt, comprehension* generators)
+ | SetComp(expr elt, comprehension* generators)
+ | DictComp(expr key, expr value, comprehension* generators)
| GeneratorExp(expr elt, comprehension* generators)
-- the grammar constrains where yield expressions can occur
| Yield(expr? value)