timothycrosley / jiphy

Your client side done in a jiphy. Python to JavaScript 2-way converter.
MIT License
585 stars 73 forks source link

For loop incorrect placement of closing bracket #14

Closed patrikturi closed 8 years ago

patrikturi commented 8 years ago

The following python code

def clear():
    grid = []
    for i in range(0, config.SIZE):
        grid.append(0)

maps to

function clear() {
    grid = [];
    for (i in range(0, config.SIZE)) {
        grid.push(0;    });
}

This happens with while loops as well. Do you know any workaround?

timothycrosley commented 8 years ago

Hi @Dimitri0xff,

Thanks for finding this issue! I've pushed a new release to PYPI 1.2.1 which is available for download now and resolves this problem.

Thanks!

~Timothy