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 | 8 |
9 import '../compiler.dart' as api; | 9 import '../compiler.dart' as api; |
10 import 'dart2jslib.dart' as leg; | 10 import 'dart2jslib.dart' as leg; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 strips: extractCsvOption(options, '--force-strip='), | 56 strips: extractCsvOption(options, '--force-strip='), |
57 enableConcreteTypeInference: | 57 enableConcreteTypeInference: |
58 hasOption(options, '--enable-concrete-type-inference'), | 58 hasOption(options, '--enable-concrete-type-inference'), |
59 disableTypeInferenceFlag: | 59 disableTypeInferenceFlag: |
60 hasOption(options, '--disable-type-inference'), | 60 hasOption(options, '--disable-type-inference'), |
61 preserveComments: hasOption(options, '--preserve-comments'), | 61 preserveComments: hasOption(options, '--preserve-comments'), |
62 verbose: hasOption(options, '--verbose'), | 62 verbose: hasOption(options, '--verbose'), |
63 sourceMapUri: extractSourceMapUri(options), | 63 sourceMapUri: extractSourceMapUri(options), |
64 globalJsName: extractStringOption( | 64 globalJsName: extractStringOption( |
65 options, '--global-js-name=', r'$'), | 65 options, '--global-js-name=', r'$'), |
| 66 terseDiagnostics: hasOption(options, '--terse'), |
66 buildId: extractStringOption( | 67 buildId: extractStringOption( |
67 options, '--build-id=', | 68 options, '--build-id=', |
68 "build number could not be determined")) { | 69 "build number could not be determined")) { |
69 if (!libraryRoot.path.endsWith("/")) { | 70 if (!libraryRoot.path.endsWith("/")) { |
70 throw new ArgumentError("libraryRoot must end with a /"); | 71 throw new ArgumentError("libraryRoot must end with a /"); |
71 } | 72 } |
72 if (packageRoot != null && !packageRoot.path.endsWith("/")) { | 73 if (packageRoot != null && !packageRoot.path.endsWith("/")) { |
73 throw new ArgumentError("packageRoot must end with a /"); | 74 throw new ArgumentError("packageRoot must end with a /"); |
74 } | 75 } |
75 } | 76 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 handler(translateUri(span.uri, null), span.begin, span.end, | 302 handler(translateUri(span.uri, null), span.begin, span.end, |
302 message, kind); | 303 message, kind); |
303 } | 304 } |
304 } | 305 } |
305 | 306 |
306 bool get isMockCompilation { | 307 bool get isMockCompilation { |
307 return mockableLibraryUsed | 308 return mockableLibraryUsed |
308 && (options.indexOf('--allow-mock-compilation') != -1); | 309 && (options.indexOf('--allow-mock-compilation') != -1); |
309 } | 310 } |
310 } | 311 } |
OLD | NEW |