Mercurial > cpython-lru_cache-weakref
diff Parser/Python.asdl @ 37453:16a64e394602 legacy-trunk
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.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Tue, 04 Apr 2006 04:00:23 +0000 |
| parents | 57322cb2ca11 |
| children | 353c009f6c53 f87a3e61853d |
line wrap: on
line diff
--- a/Parser/Python.asdl Tue Apr 04 03:05:44 2006 +0000 +++ b/Parser/Python.asdl Tue Apr 04 04:00:23 2006 +0000 @@ -98,8 +98,11 @@ 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)
