clpy icon indicating copy to clipboard operation
clpy copied to clipboard

headercvt should support independently-tagged struct definition

Open nsakabe-fixstars opened this issue 5 years ago • 2 comments

https://github.com/fixstars/clpy/blob/016015aea2367dad02a631d7d87e1f45f9d9efc9/tests/clpy_tests/opencl_tests/headercvt_tests/test_headercvt_types.py#L75-L85

nsakabe-fixstars avatar Sep 13 '19 08:09 nsakabe-fixstars

@vorj said (Sep 13th at 5:45:12 PM):

これちゃんと対応しようとするとultimaと同じようにAST相当を別途内部で保持しておいて、typedefのマップも持って、最後に一気に出力するようなコードに落ち着きそう

構造体定義よりtypedefが先行する可能性もある

nsakabe-fixstars avatar Oct 02 '19 03:10 nsakabe-fixstars

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).

vorj avatar Oct 02 '19 06:10 vorj