Commit bc2aaad
committed
Add post-formatters and enhance type mapping
Introduce post-generation formatters and significantly enrich type/method mapping metadata.
- README: document mapping.options.formatters with examples and supported placeholders.
- generator: implement formatter normalization, token expansion and subprocess execution to run configured formatters after code generation; respect continue_on_error and surface warnings/errors.
- context: extend Mapped* dataclasses and TypeMapper with API types, call symbols/args, return-bridge logic, string-free symbol lookup, singleton handling, symbol overrides, bridge/param rules, and improved name handling; update map_function/map_method/map_class to populate new metadata and derive property/getter info.
- normalizer: more robust type parsing (catch ValueError from clang types), map common C/C++ type spellings to IRType kinds (including pointers/references/cstrings), and return "unknown" for unresolvable cursor paths.
These changes enable richer codegen metadata for downstream templates and allow auto-formatting of generated sources.1 parent ef88f36 commit bc2aaad
File tree
4 files changed
+403
-103
lines changed- tools/bindgen
- codegen
4 files changed
+403
-103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
467 | 493 | | |
468 | 494 | | |
469 | 495 | | |
| |||
0 commit comments