class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter
make sure the comments gets indented properly.
but does contain comments. In this case we do some special formatting to
This is a special formatter used if the hash literal contains no values
def format(q)
def format(q) q.group do q.text("{") q.indent do lbrace.comments.each do |comment| q.breakable_force comment.format(q) end end q.breakable_force q.text("}") end end
def initialize(lbrace)
def initialize(lbrace) @lbrace = lbrace end