anchor.diff:    scanTotalChars += contents.length;
     // TODO(sigmund): is there a way to scan from a random-access-file without
     // first converting to String?
  -  var scanner = new Scanner(source, new CharSequenceReader(contents),
  -      AnalysisErrorListener.NULL_LISTENER)..preserveComments = false;
  +  var scanner = new _Scanner(contents);
     var token = scanner.tokenize();
     scanTimer.stop();
     return token;
  +}
  +
  +class _Scanner extends Scanner {
  +  _Scanner(String contents) : super(new CharSequenceReader(contents)) {
  +    preserveComments = false;
  +  }
  +
  +  @override
  +  void reportError(errorCode, int offset, List<Object> arguments) {
  +    // ignore errors.
  +  }
   }
   
   /// Report that metric [name] took [time] micro-seconds to process
  
positive.code: import 'package:kernel/analyzer/loader.dart';
  import 'package:kernel/kernel.dart';
  import 'package:package_config/discovery.dart';
  
  /// Cumulative total number of chars scanned.
  int scanTotalChars = 0;
  
negative.code: import 'dart:io' show exit, stderr;
  
  import 'package:analyzer/dart/ast/ast.dart';
  import 'package:analyzer/error/listener.dart';
  import 'package:analyzer/file_system/file_system.dart' show ResourceUriResolver;
  import 'package:analyzer/file_system/physical_file_system.dart'
      show PhysicalResourceProvider;
  import 'package:analyzer/source/package_map_resolver.dart';
  import 'package:analyzer/src/context/builder.dart';
  import 'package:analyzer/src/dart/sdk/sdk.dart' show FolderBasedDartSdk;
  import 'package:analyzer/src/generated/parser.dart';
  import 'package:analyzer/src/generated/source.dart';
  