| 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 | 8 |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 | 10 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 declaredVariables.define(variableName, value); | 257 declaredVariables.define(variableName, value); |
| 258 }); | 258 }); |
| 259 } | 259 } |
| 260 // Uncomment the following to have errors reported on stdout and stderr | 260 // Uncomment the following to have errors reported on stdout and stderr |
| 261 AnalysisEngine.instance.logger = new StdLogger(options.log); | 261 AnalysisEngine.instance.logger = new StdLogger(options.log); |
| 262 | 262 |
| 263 // set options for context | 263 // set options for context |
| 264 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); | 264 AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl(); |
| 265 contextOptions.cacheSize = _MAX_CACHE_SIZE; | 265 contextOptions.cacheSize = _MAX_CACHE_SIZE; |
| 266 contextOptions.hint = !options.disableHints; | 266 contextOptions.hint = !options.disableHints; |
| 267 contextOptions.enableAsync = options.enableAsync; |
| 268 contextOptions.enableEnum = options.enableEnum; |
| 267 context.analysisOptions = contextOptions; | 269 context.analysisOptions = contextOptions; |
| 268 | 270 |
| 269 // Create and add a ChangeSet | 271 // Create and add a ChangeSet |
| 270 ChangeSet changeSet = new ChangeSet(); | 272 ChangeSet changeSet = new ChangeSet(); |
| 271 changeSet.addedSource(source); | 273 changeSet.addedSource(source); |
| 272 context.applyChanges(changeSet); | 274 context.applyChanges(changeSet); |
| 273 } | 275 } |
| 274 | 276 |
| 275 void addCompilationUnitSource(CompilationUnitElement unit, Set<LibraryElement>
libraries, | 277 void addCompilationUnitSource(CompilationUnitElement unit, Set<LibraryElement>
libraries, |
| 276 Set<CompilationUnitElement> units) { | 278 Set<CompilationUnitElement> units) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 391 } |
| 390 } | 392 } |
| 391 | 393 |
| 392 @override | 394 @override |
| 393 void logInformation2(String message, Exception exception) { | 395 void logInformation2(String message, Exception exception) { |
| 394 if (log) { | 396 if (log) { |
| 395 stdout.writeln(message); | 397 stdout.writeln(message); |
| 396 } | 398 } |
| 397 } | 399 } |
| 398 } | 400 } |
| OLD | NEW |