2
0
Эх сурвалжийг харах

bindings generation: dump intermediate JSON for easier debugging

Andre Weissflog 2 жил өмнө
parent
commit
818d12e997
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  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['dep_prefix'] = dep_prefix(decl, dep_prefixes)
                 outp['decls'].append(outp_decl)
+    with open(f'{module}.json', 'w') as f:
+        f.write(json.dumps(outp, indent=2));
     return outp