Skip to content

Commit 6cf63b0

Browse files
committed
[caffeine] Support return values from jmp
1 parent 9ff04cd commit 6cf63b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

caffeine/modules/operators/internal.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ def operator_if(func: object, args: list) -> None:
3232

3333
@operator("jmp")
3434
def operator_jmp(func: object, args: list) -> None:
35-
func.append(f"{args[0]}({', '.join([convert_value(a) for a in args[1:]])})")
35+
assign = ", ".join([a[1:] for a in args[1:] if a[0] == "?"])
36+
assign += " = " if assign else ""
37+
func.append(f"{assign}{args[0]}({', '.join([a for a in args[1:] if a[0] != '?'])})")
3638

3739
@operator("rem")
3840
def operator_rem(func: object, args: list) -> None:

0 commit comments

Comments
 (0)