Commit Graph

2 Commits

Author SHA1 Message Date
Peterino2 4440566657 feat: add JSON output mode for SDL header parser
- Add --generate-json=<file> flag to output API metadata as JSON
- JSONSerializer collects all declarations and serializes to JSON
- Includes all types: opaque, typedefs, function pointers, enums, structs, unions, flags, functions
- Tested with SDL_init.h, SDL_video.h, SDL_gpu.h, SDL_pixels.h, SDL_rect.h
- JSON can be queried with jq for API analysis

Note: Minor memory leaks exist in comment duplication, will address separately
2026-01-22 16:53:39 -08:00
Peterino2 b7ec134b0e Implement JSON output feature for SDL parser
- Add --generate-json flag to output structured JSON representation
- JSON includes all parsed types: opaques, typedefs, function pointers,
  enums, structs, unions, flags, and functions
- Preserves doc comments and inline comments in JSON output
- Proper JSON escaping for special characters
- Tested with SDL_gpu.h and test_small.h
- Validates as proper JSON format
2026-01-22 15:30:02 -08:00