differentmatt / filbert

JavaScript parser of Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Single line while can't handle multiple statements

differentmatt opened this issue · comments

This is probably not limited to while loops.

Input:

total = 0
while True: total += 1; break;
print(total)

Output:

var total = 0;
while (true) {
    total = __pythonRuntime.ops.add(total, 1);
}
break;
;
__pythonRuntime.functions.print(total);