INNER CODE UNIT · Python
main
OverShifted/OverEngine · utils/wren_to_c_string.py:34
def main():
parser = argparse.ArgumentParser(
description="Convert a Wren library to a C string literal.")
parser.add_argument("output", help="The output file to write")
parser.add_argument("input", help="The source .wren file")
args = parser.parse_args()
with open(args.input, "r") as f:
wren_source_lines = f.readlines()
module = os.path.splitext(os.path.basename(args.input))[0]
module = module.replace("opt_", "")
module = module.replace("wren_", "")
c_source = wren_to_c_string(args.input, wren_source_lines, module)
with open(args.output, "w") as f: