Parse Python bindings for structs, enums, and unions.
authorW. Trevor King <wking@drexel.edu>
Sat, 19 Feb 2011 19:45:35 +0000 (14:45 -0500)
committerW. Trevor King <wking@drexel.edu>
Sat, 19 Feb 2011 19:45:38 +0000 (14:45 -0500)
commit76be7f14f7a753e103f9632120a5076fc3b0221f
treee6b3f15ac7f5d6935f6539839d4220d640d1d088
parent6c01078922830dbd50efeac385f043798e540ec3
Parse Python bindings for structs, enums, and unions.

Add p_c_python_binding to Cython.Compiler.Parsing and use it to parse
Python bindings of the form

    [cdef|cpdef] <visibility>

where <visibility> is only checked if the cdef flag is set.

In some places (e.g. stucts, enums, unions, and their members) this
syntax is new.  For classes and their members, p_c_python_binding
mimics the previous implementation.  Where the syntax is new, the
supporting Node changes have not yet been implemented.

The test suite currently passes with the exception of position
specifications for some error messages.  I'm waiting for feedback from
the mailing list to see how these should be addressed.
Cython/Compiler/Parsing.pxd
Cython/Compiler/Parsing.py
Cython/Compiler/Symtab.py