diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-04-04 04:00:23 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2006-04-04 04:00:23 (GMT) |
commit | 2f327c14eb998e8796a3775aa6a7aade14e97004 (patch) | |
tree | 3de98142ca2b873c0cfb25f630c7dda2d90f96fa /Parser/Python.asdl | |
parent | cb30f97bd3bdea2e884e8faec23751b39db4c0b3 (diff) | |
download | cpython-2f327c14eb998e8796a3775aa6a7aade14e97004.zip cpython-2f327c14eb998e8796a3775aa6a7aade14e97004.tar.gz cpython-2f327c14eb998e8796a3775aa6a7aade14e97004.tar.bz2 |
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.asdl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl index 4397d89..00de381 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) |