| 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 library analyzer.src.generated.sdk2; | 5 library analyzer.src.generated.sdk2; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io' as io; | 9 import 'dart:io' as io; |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 InternalAnalysisContext _analysisContext; | 59 InternalAnalysisContext _analysisContext; |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * The mapping from Dart URI's to the corresponding sources. | 62 * The mapping from Dart URI's to the corresponding sources. |
| 63 */ | 63 */ |
| 64 Map<String, Source> _uriToSourceMap = new HashMap<String, Source>(); | 64 Map<String, Source> _uriToSourceMap = new HashMap<String, Source>(); |
| 65 | 65 |
| 66 PackageBundle _sdkBundle; | 66 PackageBundle _sdkBundle; |
| 67 | 67 |
| 68 /** | 68 /** |
| 69 * Return the analysis options for this SDK analysis context. |
| 70 */ |
| 71 AnalysisOptions get analysisOptions => _analysisOptions; |
| 72 |
| 73 /** |
| 69 * Set the [options] for this SDK analysis context. Throw [StateError] if the | 74 * Set the [options] for this SDK analysis context. Throw [StateError] if the |
| 70 * context has been already created. | 75 * context has been already created. |
| 71 */ | 76 */ |
| 72 void set analysisOptions(AnalysisOptions options) { | 77 void set analysisOptions(AnalysisOptions options) { |
| 73 if (_analysisContext != null) { | 78 if (_analysisContext != null) { |
| 74 throw new StateError( | 79 throw new StateError( |
| 75 'Analysis options cannot be changed after context creation.'); | 80 'Analysis options cannot be changed after context creation.'); |
| 76 } | 81 } |
| 77 _analysisOptions = options; | 82 _analysisOptions = options; |
| 78 } | 83 } |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 SdkLibrariesReader_LibraryBuilder libraryBuilder = | 883 SdkLibrariesReader_LibraryBuilder libraryBuilder = |
| 879 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); | 884 new SdkLibrariesReader_LibraryBuilder(_useDart2jsPaths); |
| 880 // If any syntactic errors were found then don't try to visit the AST | 885 // If any syntactic errors were found then don't try to visit the AST |
| 881 // structure. | 886 // structure. |
| 882 if (!errorListener.errorReported) { | 887 if (!errorListener.errorReported) { |
| 883 unit.accept(libraryBuilder); | 888 unit.accept(libraryBuilder); |
| 884 } | 889 } |
| 885 return libraryBuilder.librariesMap; | 890 return libraryBuilder.librariesMap; |
| 886 } | 891 } |
| 887 } | 892 } |
| OLD | NEW |