Commit Graph

6 Commits

Author SHA1 Message Date
Peterino2 fbc49f1596 3 hours of vibe coding or just having a real programmer step in for 20 minutes... 2026-01-22 21:19:21 -08:00
Peterino2 2440d81b5c Fix pointer-to-const-pointer parsing (SDL_Type *const *)
- Handle cases where parameter name includes leading * characters
- Move * from parameter name to parameter type during parsing
- Support both 'SDL_Type *const *' and 'SDL_Type * const *' patterns
- All SDL3 headers now generate without syntax errors
2026-01-22 19:45:02 -08:00
Peterino2 a71d236c0c parser: Fix multiple parsing issues
- 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.
2026-01-22 19:25:22 -08:00
Peterino2 2339ac2268 parser: fix pointer type conversion for const int * and Uint8 **
- Add handling for 'Uint8 **' -> '[*c][*c]u8'
- Add handling for 'const int *' -> '[*c]const c_int'
- Fixes syntax errors in generated audio.zig and other headers
2026-01-22 19:04:19 -08:00
Peterino2 83aa5fc26c Add mutex to ignore list, keep only core SDL3 APIs 2026-01-22 18:56:56 -08:00
Peterino2 d03338034e Generate all 53 SDL3 public API bindings
- Updated build.zig to include all public SDL3 headers
- Successfully generated 53 Zig binding files in v2/
- 41 APIs generated cleanly without errors
- 12 APIs generated with syntax errors to be fixed

Clean APIs include:
- Core: init, error, log, hints, version
- Platform: clipboard, filesystem, locale, misc, power, storage
- Input: events, keyboard, mouse, gamepad, joystick, pen, sensor, touch
- Media: video, audio, camera
- Graphics: gpu, render, pixels, surface, rect, blendmode
- Utilities: atomic, endian, guid, properties, time, timer
- System: cpuinfo, process, thread, mutex

APIs with errors to fix:
- assert, audio, haptic, hidapi, iostream, joystick
- mutex, render, system, thread, tray, vulkan

Common issues identified:
- Malformed type names in dependency detection
- Missing SDL_FunctionPointer typedef
- Complex function pointer patterns need better parsing
2026-01-22 18:46:27 -08:00