fix do wrap bugs

This commit is contained in:
2023-03-11 02:06:36 +00:00
parent 597be4e0df
commit f5d8eb6d70
5 changed files with 18 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ func parseReturn(code UNPARSEcode, index int, codeline []UNPARSEcode) (CallJumpS
realcode: code.realcode,
line: code.line,
path: code.path,
}, index, codeline, 0)
}, index, codeline, 1)
return CallJumpStatment{
TYPE: "return",
value: resp,
@@ -57,3 +57,12 @@ func runJumpStatment(code CallJumpStatment, stack stack) (any, ArErr) {
path: code.path,
}, ArErr{}
}
func openJump(resp any) any {
switch x := resp.(type) {
case PassBackJumpStatment:
return x.value
default:
return resp
}
}