def start_of_statement(self):
        if (self.flags.last_text == 'do' \
                or (self.flags.last_text == 'else' and self.token_text != 'if' ) \
                or (self.last_type == 'TK_END_EXPR' and (self.previous_flags.mode == MODE.ForInitializer or self.previous_flags.mode == MODE.Conditional))):
            # Issue #276:
            # If starting a new statement with [if, for, while, do], push to a new line.
            # if (a) if (b) if(c) d(); else e(); else f();
            self.allow_wrap_or_preserved_newline(self.token_text, self.token_text in ['do', 'for', 'if', 'while']);

            self.set_mode(MODE.Statement);
            # Issue #275:
            # If starting on a newline, all of a statement should be indented.
            # if not, use line wrapping logic for indent.
            if self.just_added_newline():
                self.indent()
                self.output_wrapped = False

            return True
        else:
            return False
dataset/ETHPy150Open Masood-M/yalih/jsbeautifier/build/lib.linux-i686-2.7/jsbeautifier/__init__.py/Beautifier.start_of_statement/original