class Rufo::Formatter
def visit_hash_key_value(node)
def visit_hash_key_value(node) # key => value # # [:assoc_new, key, value] _, key, value = node # If a symbol comes it means it's something like # `:foo => 1` or `:"foo" => 1` and a `=>` # always follows symbol = current_token_kind == :on_symbeg visit key skip_space_or_newline consume_space track_hash_key # Don't output `=>` for keys that are `label: value` # or `"label": value` if symbol || !(key[0] == :@label || key[0] == :dyna_symbol) consume_op "=>" skip_space_or_newline write_space " " end visit value end