瀏覽代碼

bindings generation: dump intermediate JSON for easier debugging

Andre Weissflog 2 年之前
父節點
當前提交
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