class SyntaxTree::HshPtn::KeywordFormatter

Formats a key-value pair in a hash pattern. The value is optional.

def comments

def comments
  []
end

def format(q)

def format(q)
  HashKeyFormatter::Labels.new.format_key(q, key)
  if value
    q.text(" ")
    q.format(value)
  end
end

def initialize(key, value)

def initialize(key, value)
  @key = key
  @value = value
end