- Fix enum/struct/union parsing to stop at semicolons (prevents grabbing next declaration's body)
- Fix scanOpaque to handle forward declarations with mismatched names (typedef struct tagMSG MSG)
- Fix scanOpaque to reject pointer typedefs (typedef struct X *Y)
- Add support for pointer typedefs in scanTypedef
- Add type conversion for opaque struct pointers (struct X * -> *anyopaque)
- Fix double pointer type conversion (SDL_Type * const * -> [*c]const *Type)
This fixes audio, camera, and system header generation. 46/48 headers now generate successfully.
- Strip 'u'/'U' suffix from hex literals before parsing bit positions
- Fixed array parameter syntax (argv[]) -> converted to pointer-to-pointer
- Added type conversion for char ** and char**
- SDL_init.h now parses successfully (15/16 headers working)
Still unsupported:
- SDL_iostream.h: function pointer fields in structs (complex C syntax)
- Implemented --generate-json flag to export parsed API as JSON
- Added proper JSON formatting using std.json
- Fixed memory leaks in JSON generation
- Updated build.zig to generate 15 different SDL headers
- Successfully parsing 13/15 headers (init and iostream have issues)
Working headers:
- SDL_gpu, SDL_video, SDL_events, SDL_keyboard
- SDL_mouse, SDL_scancode, SDL_keycode, SDL_pixels
- SDL_rect, SDL_surface, SDL_blendmode, SDL_timer
- SDL_error
Known issues:
- SDL_init.h: array syntax in function pointer params (argv[])
- SDL_iostream.h: function pointer fields in structs not supported