class Rufo::Formatter
def indent_body(exps)
def indent_body(exps) indent do consume_end_of_line(want_multiline: false) end # A then keyword can appear after a newline after an `if`, `unless`, etc. # Since that's a super weird formatting for if, probably way too obsolete # by now, we just remove it. if keyword?("then") next_token skip_space_or_newline end # If the body is [[:void_stmt]] it's an empty body # so there's nothing to write if exps.size == 1 && exps[0][0] == :void_stmt skip_space_or_newline else indent do visit_exps exps, with_indent: true end write_line unless @last_was_newline end end