lua code:
local b = 2
function add()
c = 3
return b + c
end
print(add())
decompiled:
slot0 = 2
function add()
c = 3
return 3 + c
end
print(add())
return
with bugfix-locals branch, ljd crashed:
Traceback (most recent call last):
File "main.py", line 123, in
retval = main()
File "main.py", line 104, in main
ljd.ast.unwarper.unwarp(ast)
File "/Users/../ljd/ast/unwarper.py", line 38, in unwarp
_glue_flows(node)
File "/Users/../ljd/ast/unwarper.py", line 61, in _glue_flows
assert isinstance(blocks[-1].warp, nodes.EndWarp)
AttributeError: 'Return' object has no attribute 'warp'
lua code:
local b = 2
function add()
c = 3
return b + c
end
print(add())
decompiled:
slot0 = 2
function add()
c = 3
return 3 + c
end
print(add())
return
with bugfix-locals branch, ljd crashed:
Traceback (most recent call last):
File "main.py", line 123, in
retval = main()
File "main.py", line 104, in main
ljd.ast.unwarper.unwarp(ast)
File "/Users/../ljd/ast/unwarper.py", line 38, in unwarp
_glue_flows(node)
File "/Users/../ljd/ast/unwarper.py", line 61, in _glue_flows
assert isinstance(blocks[-1].warp, nodes.EndWarp)
AttributeError: 'Return' object has no attribute 'warp'