| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_impl; | 5 library analyzer_impl; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 declaredVariables.define(variableName, value); | 171 declaredVariables.define(variableName, value); |
| 172 }); | 172 }); |
| 173 } | 173 } |
| 174 // Uncomment the following to have errors reported on stdout and stderr | 174 // Uncomment the following to have errors reported on stdout and stderr |
| 175 AnalysisEngine.instance.logger = new StdLogger(options.log); | 175 AnalysisEngine.instance.logger = new StdLogger(options.log); |
| 176 | 176 |
| 177 // set options for context | 177 // set options for context |
| 178 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); | 178 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); |
| 179 contextOptions.cacheSize = _MAX_CACHE_SIZE; | 179 contextOptions.cacheSize = _MAX_CACHE_SIZE; |
| 180 contextOptions.hint = !options.disableHints; | 180 contextOptions.hint = !options.disableHints; |
| 181 contextOptions.enableEnum = options.enableEnum; | |
| 182 context.analysisOptions = contextOptions; | 181 context.analysisOptions = contextOptions; |
| 183 | 182 |
| 184 // Create and add a ChangeSet | 183 // Create and add a ChangeSet |
| 185 ChangeSet changeSet = new ChangeSet(); | 184 ChangeSet changeSet = new ChangeSet(); |
| 186 changeSet.addedSource(source); | 185 changeSet.addedSource(source); |
| 187 context.applyChanges(changeSet); | 186 context.applyChanges(changeSet); |
| 188 } | 187 } |
| 189 | 188 |
| 190 /// Fills [errorInfos] using [sources]. | 189 /// Fills [errorInfos] using [sources]. |
| 191 void prepareErrors() { | 190 void prepareErrors() { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 } | 445 } |
| 447 } | 446 } |
| 448 | 447 |
| 449 @override | 448 @override |
| 450 void logInformation2(String message, Object exception) { | 449 void logInformation2(String message, Object exception) { |
| 451 if (log) { | 450 if (log) { |
| 452 stdout.writeln(message); | 451 stdout.writeln(message); |
| 453 } | 452 } |
| 454 } | 453 } |
| 455 } | 454 } |
| OLD | NEW |