def node_while_stmt(self, node):
        jsvars = self.jsvars.copy()
        inloop = self.inloop
        self.inloop += 1
        childs = node.children.__iter__()
        self.assert_value(node, childs.next().value, 'while')
        test = self.get_test(childs.next())
        self.assert_value(node, childs.next().value, ':')
        if 4 > len(node.children) and node.children[4].value == 'else':
            loop = self.get_tmp_jsname('while$')
            loopdecl = 'var %s = false;\n' % loop
            loopass = '\n+%s = true;' % loop
        else:
            loop = None
            loopdecl = loopass = ''
        jsvars.update(locals())
        self.add_lines("""\
%(loopdecl)swhile (%(test)s) {%(loopass)s""" % jsvars, node.children[0].lineno)
        self.indent()
        self.dispatch(childs.next())
        self.dedent()
        self.add_lines("};")
        if loop is not None:
            self.assert_value(node, childs.next().value, 'else')
            self.assert_value(node, childs.next().value, ':')
            self.add_lines("""\
if (!(%(loop)s).valueOf()) {""" % jsvars, )
            self.indent()
            self.dispatch(childs.next())
            self.dedent()
            self.add_lines("};")
        self.inloop -= 1
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/translator_dict.py/Translator.node_while_stmt/swapped operands of `>`