class SyntaxTree::ArrayLiteral::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 array literal contains no values
def format(q)
def format(q) q.group do q.text("[") q.indent do lbracket.comments.each do |comment| q.breakable_force comment.format(q) end end q.breakable_force q.text("]") end end
def initialize(lbracket)
def initialize(lbracket) @lbracket = lbracket end