'Puts the token on the current line.
Appends the next token to the state and updates information necessary for
indentation.
Arguments:
dry_run: (bool) Commit whitespace changes to the FormatToken if True.'

def _AddTokenOnCurrentLine(self, dry_run):

    current = self.next_token
    previous = current.previous_token
    spaces = current.spaces_required_before
    if (not dry_run):
        current.AddWhitespacePrefix(newlines_before=0, spaces=spaces)
    if previous.OpensScope():
        if (not current.is_comment):
            self.stack[(-1)].closing_scope_indent = (self.column - 1)
            if style.Get('ALIGN_CLOSING_BRACKET_WITH_VISUAL_INDENT'):
                self.stack[(-1)].closing_scope_indent += 1
            self.stack[(-1)].indent = (self.column + spaces)
        else:
            self.stack[(-1)].closing_scope_indent = (self.stack[(-1)].indent - style.Get('CONTINUATION_INDENT_WIDTH'))
    self.column += spaces
