Method: SyntaxTree::Case#pretty_print

Defined in:
lib/syntax_tree.rb

#pretty_print(q) ⇒ Object



3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
# File 'lib/syntax_tree.rb', line 3363

def pretty_print(q)
  q.group(2, "(", ")") do
    q.text("case")

    q.breakable
    q.pp(keyword)

    if value
      q.breakable
      q.pp(value)
    end

    q.breakable
    q.pp(consequent)

    q.pp(Comment::List.new(comments))
  end
end