protected void report(DiagnosticType diagnostic, Node n) {
    JSError error = JSError.make(n, diagnostic, n.toString());
    compiler.report(error);
  }
protected void report ( DiagnosticType diagnostic , Node n ) { JSError error = JSError . make ( n , diagnostic , n . toString ( ) ) ; compiler . report ( error ) ; }
Helper method for reporting an error to the compiler when applying a
peephole optimization.

@param diagnostic The error type
@param n The node for which the error should be reported