kotlin-python icon indicating copy to clipboard operation
kotlin-python copied to clipboard

Support do-while loop fully

Open SerVB opened this issue 2 years ago • 0 comments

Now continue is unsupported. Probably we can support it by compiling do { <body> } while (<condition>) as follows:

firstIterationLoopName = true
while firstIterationLoopName or (<condition>):
    firstIterationLoopName = false
    <body>

We need to introduce loop name, but there is already some logic for it in PyGenerationContext – we can pick the missing parts inside js-ir. Or we could use a concept of tmpVariable, this can be even easier.

SerVB avatar Mar 25 '22 12:03 SerVB