class Rufo::Formatter

def visit_unary(node)

def visit_unary(node)
  # [:unary, :-@, [:vcall, [:@ident, "x", [1, 2]]]]
  _, op, exp = node
  consume_op_or_keyword
  first_space = space?
  skip_space_or_newline
  if op == :not
    has_paren = current_token_kind == :on_lparen
    if has_paren && !first_space
      write "("
      next_token
      skip_space_or_newline
    elsif !has_paren && !consume_space
      write_space
    end
    visit exp
    if has_paren && !first_space
      skip_space_or_newline
      check :on_rparen
      write ")"
      next_token
    end
  else
    visit exp
  end
end