prevent parser syntax from allowing 'cdef cpdef ...'
authorStefan Behnel <scoder@users.berlios.de>
Wed, 11 Mar 2009 16:34:43 +0000 (17:34 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 11 Mar 2009 16:34:43 +0000 (17:34 +0100)
Cython/Compiler/Parsing.py

index 2ec67e416d8af0b23773ceb16e6cd194c2b1b98e..62c041aa09136ea3ecb4d183da5fa4d5b91aed2e 100644 (file)
@@ -1503,7 +1503,7 @@ def p_statement(s, ctx, first_statement = 0):
     if s.sy == 'cdef':
         cdef_flag = 1
         s.next()
-    if s.sy == 'cpdef':
+    elif s.sy == 'cpdef':
         cdef_flag = 1
         overridable = 1
         s.next()