projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9db1e9
)
re-allow 'pass' statement in cdef blocks
author
Stefan Behnel
<scoder@users.berlios.de>
Mon, 4 May 2009 20:19:40 +0000
(22:19 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Mon, 4 May 2009 20:19:40 +0000
(22:19 +0200)
Cython/Compiler/Parsing.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Parsing.py
b/Cython/Compiler/Parsing.py
index ad2d2f77af7942f0defde1a3355d25e68d3add01..ac812f734ca88bfd77b9c183681b37442892aa80 100644
(file)
--- a/
Cython/Compiler/Parsing.py
+++ b/
Cython/Compiler/Parsing.py
@@
-1498,6
+1498,9
@@
def p_statement(s, ctx, first_statement = 0):
decorators = p_decorators(s)
if s.sy not in ('def', 'cdef', 'cpdef'):
s.error("Decorators can only be followed by functions ")
+ elif s.sy == 'pass' and cdef_flag:
+ # empty cdef block
+ return p_pass_statement(s, with_newline = 1)
overridable = 0
if s.sy == 'cdef':