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 library leg_apiimpl; | 5 library leg_apiimpl; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
9 | 9 |
10 import 'package:package_config/packages.dart'; | 10 import 'package:package_config/packages.dart'; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 forceIncrementalSupport || | 111 forceIncrementalSupport || |
112 hasOption(options, '--incremental-support'), | 112 hasOption(options, '--incremental-support'), |
113 suppressWarnings: hasOption(options, '--suppress-warnings'), | 113 suppressWarnings: hasOption(options, '--suppress-warnings'), |
114 fatalWarnings: hasOption(options, '--fatal-warnings'), | 114 fatalWarnings: hasOption(options, '--fatal-warnings'), |
115 enableExperimentalMirrors: | 115 enableExperimentalMirrors: |
116 hasOption(options, '--enable-experimental-mirrors'), | 116 hasOption(options, '--enable-experimental-mirrors'), |
117 generateCodeWithCompileTimeErrors: | 117 generateCodeWithCompileTimeErrors: |
118 hasOption(options, '--generate-code-with-compile-time-errors'), | 118 hasOption(options, '--generate-code-with-compile-time-errors'), |
119 testMode: hasOption(options, '--test-mode'), | 119 testMode: hasOption(options, '--test-mode'), |
120 allowNativeExtensions: | 120 allowNativeExtensions: |
121 hasOption(options, '--allow-native-extensions')) { | 121 hasOption(options, '--allow-native-extensions'), |
| 122 allowAssertMessage: hasOption(options, '--enable-assert-message')) { |
122 tasks.addAll([ | 123 tasks.addAll([ |
123 userHandlerTask = new GenericTask('Diagnostic handler', this), | 124 userHandlerTask = new GenericTask('Diagnostic handler', this), |
124 userProviderTask = new GenericTask('Input provider', this), | 125 userProviderTask = new GenericTask('Input provider', this), |
125 userPackagesDiscoveryTask = | 126 userPackagesDiscoveryTask = |
126 new GenericTask('Package discovery', this), | 127 new GenericTask('Package discovery', this), |
127 ]); | 128 ]); |
128 if (libraryRoot == null) { | 129 if (libraryRoot == null) { |
129 throw new ArgumentError("[libraryRoot] is null."); | 130 throw new ArgumentError("[libraryRoot] is null."); |
130 } | 131 } |
131 if (!libraryRoot.path.endsWith("/")) { | 132 if (!libraryRoot.path.endsWith("/")) { |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 print('$message: ${tryToString(exception)}'); | 503 print('$message: ${tryToString(exception)}'); |
503 print(tryToString(stackTrace)); | 504 print(tryToString(stackTrace)); |
504 } | 505 } |
505 | 506 |
506 fromEnvironment(String name) => environment[name]; | 507 fromEnvironment(String name) => environment[name]; |
507 | 508 |
508 LibraryInfo lookupLibraryInfo(String libraryName) { | 509 LibraryInfo lookupLibraryInfo(String libraryName) { |
509 return library_info.LIBRARIES[libraryName]; | 510 return library_info.LIBRARIES[libraryName]; |
510 } | 511 } |
511 } | 512 } |
OLD | NEW |