[pypy-svn] r57454 - pypy/branch/2.5-features/pypy/interpreter/pyparser
bgola at codespeak.net
bgola at codespeak.net
Tue Aug 19 05:39:39 CEST 2008
Author: bgola
Date: Tue Aug 19 05:39:38 2008
New Revision: 57454
Modified:
pypy/branch/2.5-features/pypy/interpreter/pyparser/astbuilder.py
Log:
more fixes for translating pypy-c (assert)
Modified: pypy/branch/2.5-features/pypy/interpreter/pyparser/astbuilder.py
==============================================================================
--- pypy/branch/2.5-features/pypy/interpreter/pyparser/astbuilder.py (original)
+++ pypy/branch/2.5-features/pypy/interpreter/pyparser/astbuilder.py Tue Aug 19 05:39:38 2008
@@ -870,7 +870,9 @@
tokens = slicecut( atoms, index+1, -1 )
else:
tokens = atoms[index:]
- if tokens[-1].name == builder.parser.tokens['COMMA']:
+ token = tokens[-1]
+ assert isinstance(token, TokenObject) # XXX
+ if token.name == builder.parser.tokens['COMMA']:
raise SyntaxError, "trailing comma not allowed without" \
"surrounding parentheses"
More information about the Pypy-commit
mailing list