Ticket #61 (closed defect: worksforme)
Buffers in cdef function argument list
| Reported by: | dagss | Owned by: | dagss |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.14 |
| Component: | Parsing | Keywords: | buffer cdef parser numerics |
| Cc: |
Description
The parser doesn't allow
cdef void foo(np.ndarray[float] X):
pass
This is because the parser has to support
cdef void foo(int[] X)
and at the point of parsing the [ it isn't known whether is is a definition or declaration (right?)
One could for instance parse to the end of the line and check for a ":" when encountering the [ in a cdef (and store info to coordinate this in the parsing context) -- as the two cases can be seperated on whether it is a definition or not.
Another option is to use a "TrailingBracketTypeNode?" rather than let the parser resolve it.
Change History
Note: See
TracTickets for help on using
tickets.
