Commit e6bdd3e
committed
Add --dump-context and native/string mapping
Expose a --dump-context CLI flag and implement context JSON dumping to aid template debugging. Added dump_context_json to serialize the mapped template context (files, types, functions, classes, etc.) and updated README to document the option.
Enhance TypeMapper and mapped model to better support cstring/string and native/bridge metadata: bridge_kind, native_type, string/struct free symbols, class create/destroy symbols, pre/post call setup/cleanup lines, and call-arg handling for string parameters and struct returns. Generator context now exposes uses_ffi/uses_pkgffi/uses_ui flags to templates.
IR/normalization improvements: serializer recognizes "string" type; normalizer detects std::string and maps it to kind="string", and restricts items to source paths under src/ (skipping unknown/non-src cursors).
Parser: add macOS system include discovery via xcrun/clang to provide sensible default -I args on Darwin.
Overall these changes improve template visibility, string/native interop handling, and robustness for Mac toolchains.1 parent 24de13c commit e6bdd3e
File tree
7 files changed
+345
-23
lines changed- tools/bindgen
- codegen
- ir
7 files changed
+345
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
444 | | - | |
| 445 | + | |
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| 452 | + | |
451 | 453 | | |
452 | 454 | | |
453 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
| |||
0 commit comments