summaryrefslogtreecommitdiff
path: root/Parser/Python.asdl
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-04-04 04:00:23 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2006-04-04 04:00:23 +0000
commitfd0a654fa9ef5097caaf2948a6967c357a7964c0 (patch)
treedda2b62758a16d957407181b8a4a9bbec4b0beb1 /Parser/Python.asdl
parent3bbfd9761b50446e7e945a0713bc625e4e8b46ae (diff)
downloadcpython-fd0a654fa9ef5097caaf2948a6967c357a7964c0.tar.gz
Add lineno, col_offset to excephandler to enable future fix for
tracing/line number table in except blocks. Reflow long lines introduced by col_offset changes. Update test_ast to handle new fields in excepthandler. As note in Python.asdl says, we might want to rethink how attributes are handled. Perhaps they should be the same as other fields, with the primary difference being how they are defined for all types within a sum. Also fix asdl_c so that constructors with int fields don't fail when passed a zero value.
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 4397d897b1..00de381c8d 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -98,8 +98,11 @@ module Python version "$Revision$"
comprehension = (expr target, expr iter, expr* ifs)
-- not sure what to call the first argument for raise and except
-
- excepthandler = (expr? type, expr? name, stmt* body)
+ -- TODO(jhylton): Figure out if there is a better way to handle
+ -- lineno and col_offset fields, particularly when
+ -- ast is exposed to Python.
+ excepthandler = (expr? type, expr? name, stmt* body, int lineno,
+ int col_offset)
arguments = (expr* args, identifier? vararg,
identifier? kwarg, expr* defaults)