# File lib/puppet-lint/plugins/check_comments.rb, line 38
  def fix(problem)
    comment_lines = problem[:token].value.split("\n")
    first_line = comment_lines.shift
    problem[:token].type = :COMMENT
    problem[:token].value = " #{first_line}"

    index = tokens.index(problem[:token].next_token)
    comment_lines.reverse.each do |line|
      [
        PuppetLint::Lexer::Token.new(:COMMENT, " #{line}", 0, 0),
        PuppetLint::Lexer::Token.new(:INDENT, problem[:token].prev_token.value.dup, 0, 0),
        PuppetLint::Lexer::Token.new(:NEWLINE, "\n", 0, 0),
      ].each do |new_token|
        tokens.insert(index, new_token)
      end
    end
  end