| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:io'; | 5 import 'dart:io'; |
| 6 import 'package:analyzer/src/generated/source.dart' show Source; | 6 import 'package:analyzer/src/generated/source.dart' show Source; |
| 7 import 'package:analyzer/src/summary/package_bundle_reader.dart' | 7 import 'package:analyzer/src/summary/package_bundle_reader.dart' |
| 8 show InSummarySource; | 8 show InSummarySource; |
| 9 import 'package:args/args.dart' show ArgParser, ArgResults; | 9 import 'package:args/args.dart' show ArgParser, ArgResults; |
| 10 import 'package:args/command_runner.dart' show UsageException; | 10 import 'package:args/command_runner.dart' show UsageException; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 _usageException( | 202 _usageException( |
| 203 'Imported file "${source.uri}" was not found as a summary or source ' | 203 'Imported file "${source.uri}" was not found as a summary or source ' |
| 204 'file. Please pass in either the summary or the source file ' | 204 'file. Please pass in either the summary or the source file ' |
| 205 'for this import.'); | 205 'for this import.'); |
| 206 return null; // unreachable | 206 return null; // unreachable |
| 207 } | 207 } |
| 208 | 208 |
| 209 String get _usageMessage => | 209 String get _usageMessage => |
| 210 'Dart Development Compiler compiles Dart into a JavaScript module.' | 210 'Dart Development Compiler compiles Dart into a JavaScript module.' |
| 211 '\n\n${_argParser(hide: !_verbose).usage}'; | 211 '\n\n${_argParser(hide: !_verbose).usage}'; |
| 212 | 212 |
| 213 void _usageException(String message) { | 213 void _usageException(String message) { |
| 214 throw new UsageException(message, _usageMessage); | 214 throw new UsageException(message, _usageMessage); |
| 215 } | 215 } |
| 216 | 216 |
| 217 /// Thrown when the input source code has errors. | 217 /// Thrown when the input source code has errors. |
| 218 class CompileErrorException implements Exception { | 218 class CompileErrorException implements Exception { |
| 219 toString() => '\nPlease fix all errors before compiling (warnings are okay).'; | 219 toString() => '\nPlease fix all errors before compiling (warnings are okay).'; |
| 220 } | 220 } |
| OLD | NEW |