class Rufo::Formatter
def skip_space_or_newline(want_semicolon = false)
def skip_space_or_newline(want_semicolon = false) found_newline = false found_comment = false last = nil while true case current_token_kind when :on_sp next_token when :on_nl, :on_ignored_nl next_token last = :newline found_newline = true when :on_semicolon if !found_newline && !found_comment write "; " end next_token last = :semicolon when :on_comment write_line if last == :newline write_indent if found_comment if current_token_value.end_with?("\n") write current_token_value.rstrip write_line else write current_token_value end next_token found_comment = true last = :comment else break end end end