| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** The entry point to the compiler. Used to implement `bin/dwc.dart`. */ | 5 /** The entry point to the compiler. Used to implement `bin/dwc.dart`. */ |
| 6 library dwc; | 6 library dwc; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'package:logging/logging.dart' show Level; | 10 import 'package:logging/logging.dart' show Level; |
| 11 | 11 |
| 12 import 'src/compiler.dart'; | 12 import 'src/compiler.dart'; |
| 13 import 'src/file_system.dart'; | |
| 14 import 'src/file_system/console.dart'; | 13 import 'src/file_system/console.dart'; |
| 15 import 'src/files.dart'; | |
| 16 import 'src/messages.dart'; | 14 import 'src/messages.dart'; |
| 17 import 'src/compiler_options.dart'; | 15 import 'src/compiler_options.dart'; |
| 18 import 'src/utils.dart'; | 16 import 'src/utils.dart'; |
| 19 | 17 |
| 20 void main() { | 18 void main() { |
| 21 run(new Options().arguments).then((result) { | 19 run(new Options().arguments).then((result) { |
| 22 exit(result.success ? 0 : 1); | 20 exit(result.success ? 0 : 1); |
| 23 }); | 21 }); |
| 24 } | 22 } |
| 25 | 23 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 51 var compiler = new Compiler(new ConsoleFileSystem(), options, messages); | 49 var compiler = new Compiler(new ConsoleFileSystem(), options, messages); |
| 52 return compiler.run().then((_) { | 50 return compiler.run().then((_) { |
| 53 var success = messages.messages.every((m) => m.level != Level.SEVERE); | 51 var success = messages.messages.every((m) => m.level != Level.SEVERE); |
| 54 var msgs = options.jsonFormat | 52 var msgs = options.jsonFormat |
| 55 ? messages.messages.map((m) => m.toJson()) | 53 ? messages.messages.map((m) => m.toJson()) |
| 56 : messages.messages.map((m) => m.toString()); | 54 : messages.messages.map((m) => m.toString()); |
| 57 return new AnalysisResults(success, msgs.toList()); | 55 return new AnalysisResults(success, msgs.toList()); |
| 58 }); | 56 }); |
| 59 }, printTime: printTime, useColors: options.useColors); | 57 }, printTime: printTime, useColors: options.useColors); |
| 60 } | 58 } |
| OLD | NEW |