Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: lib/src/compiler.dart

Issue 1418563002: Restore null error listener (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Command line tool to run the checker on a Dart program. 5 /// Command line tool to run the checker on a Dart program.
6 library dev_compiler.src.compiler; 6 library dev_compiler.src.compiler;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 import 'dart:convert' show JSON; 10 import 'dart:convert' show JSON;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 loaded.remove(uri); 348 loaded.remove(uri);
349 loaded.add(uri); 349 loaded.add(uri);
350 } 350 }
351 } 351 }
352 352
353 abstract class AbstractCompiler { 353 abstract class AbstractCompiler {
354 final CompilerOptions options; 354 final CompilerOptions options;
355 final AnalysisContext context; 355 final AnalysisContext context;
356 final AnalysisErrorListener reporter; 356 final AnalysisErrorListener reporter;
357 357
358 AbstractCompiler(this.context, this.options, [this.reporter]); 358 AbstractCompiler(this.context, this.options, [AnalysisErrorListener listener])
359 : reporter = listener ?? AnalysisErrorListener.NULL_LISTENER;
359 360
360 String get outputDir => options.codegenOptions.outputDir; 361 String get outputDir => options.codegenOptions.outputDir;
361 362
362 Uri stringToUri(String uriString) { 363 Uri stringToUri(String uriString) {
363 var uri = uriString.startsWith('dart:') || uriString.startsWith('package:') 364 var uri = uriString.startsWith('dart:') || uriString.startsWith('package:')
364 ? Uri.parse(uriString) 365 ? Uri.parse(uriString)
365 : new Uri.file(path.absolute(uriString)); 366 : new Uri.file(path.absolute(uriString));
366 return uri; 367 return uri;
367 } 368 }
368 369
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 '_rtti.js', 523 '_rtti.js',
523 '_classes.js', 524 '_classes.js',
524 '_operations.js', 525 '_operations.js',
525 'dart_runtime.js', 526 'dart_runtime.js',
526 ]; 527 ];
527 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js')); 528 files.addAll(corelibOrder.map((l) => l.replaceAll('.', '/') + '.js'));
528 return files; 529 return files;
529 }(); 530 }();
530 531
531 final _log = new Logger('dev_compiler.src.compiler'); 532 final _log = new Logger('dev_compiler.src.compiler');
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698