You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
1.1 KiB

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from gen_cid import generate_cid
from gen_cid import utils
from gen_cid import cid_2_yml
def main():
vars = []
funcs = []
funcs.append("init_synth_shed")
funcs.append("synth_create")
funcs.append("synth_set_osc_count")
funcs.append("tech_to_string")
funcs.append("update_identity")
funcs.append("filtertype_to_string")
funcs.append("play_synth")
header_filename = "../../src/synth_shed/synth_shed.h"
libclang_path = "/opt/local/libexec/llvm-9.0/lib/libclang.dylib"
header = generate_cid.parse(libclang_path, header_filename, funcs, vars)
# Debug output
utils.write_json(header["ast"], "./" + "/" + header["filename"] + ".ast.json")
utils.write_json(header["cid"], "./" + "/" + header["filename"] + ".cid.json")
utils.write_json(header, "./" + "/" + header["filename"] + ".header.json")
cid = header["cid"]
funcs_str = cid_2_yml.generate_yml(cid)
print(funcs_str)
utils.write_file("./" + "/" + header["filename"] + ".cid.yml2", funcs_str)
if __name__ == "__main__":
main()