Browse Source

bindings generation: dump intermediate JSON for easier debugging

Andre Weissflog 2 năm trước cách đây
mục cha
commit
818d12e997
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      bindgen/gen_ir.py

+ 2 - 0
bindgen/gen_ir.py

@@ -119,4 +119,6 @@ def gen(header_path, source_path, module, main_prefix, dep_prefixes):
                 outp_decl['is_dep'] = is_dep
                 outp_decl['is_dep'] = is_dep
                 outp_decl['dep_prefix'] = dep_prefix(decl, dep_prefixes)
                 outp_decl['dep_prefix'] = dep_prefix(decl, dep_prefixes)
                 outp['decls'].append(outp_decl)
                 outp['decls'].append(outp_decl)
+    with open(f'{module}.json', 'w') as f:
+        f.write(json.dumps(outp, indent=2));
     return outp
     return outp