/* @flow */

import Rule from '../Rule'

import type { Command, Message, ParsedLog } from '../types'

export default class ReportLogMessages extends Rule {
  static parameterTypes: Array<Set<string>> = [new Set([
    'ParsedAsymptoteStdOut',
    'ParsedBiberLog',
    'ParsedBibTeXLog',
    'ParsedLaTeXLog',
    'ParsedMakeIndexLog',
    'ParsedMendexLog',
    'ParsedMendexStdErr',
    'ParsedSplitIndexStdErr',
    'ParsedSplitIndexStdOut',
    'ParsedXindyLog'
  ])]
  static commands: Set<Command> = new Set(['log'])
  static alwaysEvaluate: boolean = true
  static description: string = 'Reports log messages from any parsed log files.'

  async run () {
    const parsedLog: ?ParsedLog = this.firstParameter.value

    if (parsedLog) {
      for (const message: Message of parsedLog.messages) {
        this.log(message)
      }
    }
    return true
  }
}

@@ -723,21 +723,106 @@
     
-if (parsedLog
+// Not much here, just log each message, if there are any.%0A    if (parsedLog && parsedLog.messages
 ) %7B%0A

Add some comments