1
0

bytebeat_compiler.py: auto-return: enclose bytebeat in parentheses

This commit is contained in:
Intel A80486DX2-66 2024-04-14 12:29:12 +03:00
parent cc2974afe1
commit 8e698c9f3b
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -149,7 +149,9 @@ if __name__ == "__main__":
makedirs(PATHS["build_dir"], exist_ok=True)
if not args.no_return: # Insert return statement
bytebeat_contents = f"return {bytebeat_contents}"
# XXX: The bytebeat code is enclosed in parentheses to allow for the
# use of commas as a comma operator, enabling more formulas to function.
bytebeat_contents = f"return ({bytebeat_contents})"
original_sample_rate = args.sample_rate
final_sample_rate_code = ""