1
0

use name custom_return_code instead of no_return

This commit is contained in:
Intel A80486DX2-66 2024-09-23 01:21:13 +03:00
parent 178f98ba9c
commit 793c8b9a11
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -176,7 +176,8 @@ if __name__ == "__main__":
parser.add_argument("-l", "--samples", default=None, type=int, parser.add_argument("-l", "--samples", default=None, type=int,
help="length in samples (adds to `-t`; supports negative numbers) : " help="length in samples (adds to `-t`; supports negative numbers) : "
"default = +0 samples") "default = +0 samples")
parser.add_argument("-a", "--no-return", default=False, action="store_true", parser.add_argument("-a", "--custom-return-code", default=False,
action="store_true",
help="do not insert return statement before the code") help="do not insert return statement before the code")
parser.add_argument("-u", "--mode", default="sequential", type=str, parser.add_argument("-u", "--mode", default="sequential", type=str,
help="mode of writing: `sequential` or `instant` (the latter is not " help="mode of writing: `sequential` or `instant` (the latter is not "
@ -203,7 +204,7 @@ if __name__ == "__main__":
raise SystemExit("Empty file or STDIN") raise SystemExit("Empty file or STDIN")
# - Compilation # - Compilation
if not args.no_return: # Insert `return` statement if not args.custom_return_code: # Insert `return` statement
# XXX: The bytebeat code is enclosed in parentheses to allow for the # XXX: The bytebeat code is enclosed in parentheses to allow for the
# use of commas as a comma operator, enabling more formulas to function. # use of commas as a comma operator, enabling more formulas to function.
bytebeat_contents = f"return ({bytebeat_contents})" bytebeat_contents = f"return ({bytebeat_contents})"