clpy
clpy copied to clipboard
headercvt should support independently-tagged struct definition
https://github.com/fixstars/clpy/blob/016015aea2367dad02a631d7d87e1f45f9d9efc9/tests/clpy_tests/opencl_tests/headercvt_tests/test_headercvt_types.py#L75-L85
@vorj said (Sep 13th at 5:45:12 PM):
これちゃんと対応しようとするとultimaと同じようにAST相当を別途内部で保持しておいて、typedefのマップも持って、最後に一気に出力するようなコードに落ち着きそう
構造体定義よりtypedefが先行する可能性もある
In actually, ultima doesn't carry any ASTs around, but she has some mechanism of delayed output for supporting constructor. In following to this method, headercvt should hold two additional data, class body as string (like int member
) and the map of typedef
(like clpy_struct_tag
-> clpy_struct_t
).