def node_or_test(self, node, jsbool=False, name=None):
        jsvars = self.jsvars.copy()
        args = []
        childs = node.children.__iter__()
        if jsbool:
            name = None
        elif name is None:
            name = self.get_tmp_jsname('or$')
            self.add_lines("var %s" % name)
        args.append(self.get_test(childs.next(), name))
        try:
            while True:
                self.assert_value(node, childs.next().value, 'or')
                args.append(self.get_test(childs.next(), name))
        except StopIteration:
            pass
        test = ' || '.join(args)
        if jsbool:
            return test
        return '(%s ? %s : %s)' % (test, name, name)
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/translator_dict.py/Translator.node_or_test/original