mirror of
https://github.com/Open-Argon/argon-v3.git
synced 2025-12-06 08:56:07 +00:00
Fix indentation and translation errors in doWrap,
forLoop, ifStatement, and whileLoop functions. Also fix syntax error in broken_funcCall test file.
This commit is contained in:
@@ -96,7 +96,7 @@ func parseForeverLoop(code UNPARSEcode, index int, codeline []UNPARSEcode) (whil
|
||||
},
|
||||
index,
|
||||
codeline,
|
||||
2,
|
||||
3,
|
||||
)
|
||||
return whileLoop{
|
||||
condition: true,
|
||||
@@ -108,13 +108,14 @@ func parseForeverLoop(code UNPARSEcode, index int, codeline []UNPARSEcode) (whil
|
||||
}
|
||||
|
||||
func runWhileLoop(loop whileLoop, stack stack, stacklevel int) (any, ArErr) {
|
||||
|
||||
newstack := append(stack, newscope())
|
||||
for {
|
||||
condition, err := runVal(loop.condition, newstack, stacklevel+1)
|
||||
newbodystack := append(newstack, newscope())
|
||||
if err.EXISTS {
|
||||
return nil, err
|
||||
}
|
||||
newbodystack := append(newstack, newscope())
|
||||
if !anyToBool(condition) {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user