def handle_operator(self, token_text):
    if ((self.token_text == ':') and (self.flags.mode == MODE.BlockStatement) and (self.last_last_text == '{') and ((self.last_type == 'TK_WORD') or (self.last_type == 'TK_RESERVED'))):
        self.flags.mode = MODE.ObjectLiteral
    if self.start_of_statement():
        pass
    space_before = True
    space_after = True
    if ((self.last_type == 'TK_RESERVED') and self.is_special_word(self.flags.last_text)):
        self.output_space_before_token = True
        self.append_token(token_text)
        return
    if ((token_text == '*') and (self.last_type == 'TK_DOT') and (not self.last_last_text.isdigit())):
        self.append_token(token_text)
        return
    if ((token_text == ':') and self.flags.in_case):
        self.flags.case_body = True
        self.indent()
        self.append_token(token_text)
        self.append_newline()
        self.flags.in_case = False
        return
    if (token_text == '::'):
        self.append_token(token_text)
        return
    if (self.input_wanted_newline and ((token_text == '--') or (token_text == '++'))):
        self.append_newline()
    if (self.last_type == 'TK_OPERATOR'):
        self.allow_wrap_or_preserved_newline(token_text)
    if ((token_text in ['--', '++', '!', '~']) or ((token_text in ['+', '-']) and ((self.last_type in ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) or (self.flags.last_text in self.line_starters) or (self.flags.last_text == ',')))):
        space_before = False
        space_after = False
        if ((self.flags.last_text == ';') and self.is_expression(self.flags.mode)):
            space_before = True
        if (self.last_type == 'TK_RESERVED'):
            space_before = True
        if ((self.flags.mode == MODE.BlockStatement) and (self.flags.last_text in ['{', ';'])):
            self.append_newline()
    elif (token_text == ':'):
        if (self.flags.ternary_depth == 0):
            if (self.flags.mode == MODE.BlockStatement):
                self.flags.mode = MODE.ObjectLiteral
            space_before = False
        else:
            self.flags.ternary_depth -= 1
    elif (token_text == '?'):
        self.flags.ternary_depth += 1
    elif ((self.token_text == '*') and (self.last_type == 'TK_RESERVED') and (self.flags.last_text == 'function')):
        space_before = False
        space_after = False
    if space_before:
        self.output_space_before_token = True
    self.append_token(token_text)
    if space_after:
        self.output_space_before_token = True
def handle_operator(self, token_text):
    if ((self.token_text == ':') and (self.flags.mode == MODE.BlockStatement) and (self.last_last_text == '{') and ((self.last_type == 'TK_WORD') or (self.last_type == 'TK_RESERVED'))):
        self.flags.mode = MODE.ObjectLiteral
    if self.start_of_statement():
        pass
    space_before = True
    space_after = True
    if ((self.last_type == 'TK_RESERVED') and self.is_special_word(self.flags.last_text)):
        self.output_space_before_token = True
        self.append_token(token_text)
        return
    if ((token_text == '*') and (self.last_type == 'TK_DOT') and (not self.last_last_text.isdigit())):
        self.append_token(token_text)
        return
    if ((token_text == ':') and self.flags.in_case):
        self.flags.case_body = True
        self.indent()
        self.append_token(token_text)
        self.append_newline()
        self.flags.in_case = False
        return
    if (token_text == '::'):
        self.append_token(token_text)
        return
    if (self.input_wanted_newline and ((token_text == '--') or (token_text == '++'))):
        self.append_newline()
    if (self.last_type == 'TK_OPERATOR'):
        self.allow_wrap_or_preserved_newline(token_text)
    if ((token_text in ['--', '++', '!', '~']) or ((token_text in ['+', '-']) and ((self.last_type in ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) or (self.flags.last_text in self.line_starters) or (self.flags.last_text == ',')))):
        space_before = False
        space_after = False
        if ((self.flags.last_text == ';') and self.is_expression(self.flags.mode)):
            space_before = True
        if (self.last_type == 'TK_RESERVED'):
            space_before = True
        if ((self.flags.mode == MODE.BlockStatement) and (self.flags.last_text in ['{', ';'])):
            self.append_newline()
    elif (token_text == ':'):
        if (self.flags.ternary_depth == 0):
            if (self.flags.mode == MODE.BlockStatement):
                self.flags.mode = MODE.ObjectLiteral
            space_before = False
        else:
            self.flags.ternary_depth -= 1
    elif (token_text == '?'):
        self.flags.ternary_depth += 1
    elif ((self.token_text == '*') and (self.last_type == 'TK_RESERVED') and (self.flags.last_text == 'function')):
        space_before = False
        space_after = False
    if space_before:
        self.output_space_before_token = True
    self.append_token(token_text)
    if space_after:
        self.output_space_before_token = True