summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-05-27 18:58:08 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-05-27 18:58:08 (GMT)
commitbf1bbc145299964a37cfae5bc5565177192f68ad (patch)
treece4eccef9452efe19126ae83e22d006a300328c0 /Parser
parent05010706697ce9c18e7f8a8e571753b0bcfd6548 (diff)
downloadcpython-bf1bbc145299964a37cfae5bc5565177192f68ad.zip
cpython-bf1bbc145299964a37cfae5bc5565177192f68ad.tar.gz
cpython-bf1bbc145299964a37cfae5bc5565177192f68ad.tar.bz2
reflect with statements with multiple items in the AST (closes #12106)
Diffstat (limited to 'Parser')
-rw-r--r--Parser/Python.asdl4
1 files changed, 3 insertions, 1 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index 8e2e1ac..de48643 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -28,7 +28,7 @@ module Python
| For(expr target, expr iter, stmt* body, stmt* orelse)
| While(expr test, stmt* body, stmt* orelse)
| If(expr test, stmt* body, stmt* orelse)
- | With(expr context_expr, expr? optional_vars, stmt* body)
+ | With(withitem* items, stmt* body)
| Raise(expr? exc, expr? cause)
| TryExcept(stmt* body, excepthandler* handlers, stmt* orelse)
@@ -115,5 +115,7 @@ module Python
-- import name with optional 'as' alias.
alias = (identifier name, identifier? asname)
+
+ withitem = (expr context_expr, expr? optional_vars)
}