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 mock_compiler; | 5 library mock_compiler; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:compiler/compiler_new.dart' as api; | 10 import 'package:compiler/compiler_new.dart' as api; |
11 import 'package:compiler/src/common/names.dart' show Uris; | 11 import 'package:compiler/src/common/names.dart' show Uris; |
12 import 'package:compiler/src/constants/expressions.dart'; | 12 import 'package:compiler/src/constants/expressions.dart'; |
13 import 'package:compiler/src/elements/resolution_types.dart' | 13 import 'package:compiler/src/elements/resolution_types.dart' |
14 show ResolutionDartType; | 14 show ResolutionDartType; |
15 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; | 15 import 'package:compiler/src/diagnostics/diagnostic_listener.dart'; |
16 import 'package:compiler/src/diagnostics/source_span.dart'; | 16 import 'package:compiler/src/diagnostics/source_span.dart'; |
17 import 'package:compiler/src/diagnostics/spannable.dart'; | 17 import 'package:compiler/src/diagnostics/spannable.dart'; |
18 import 'package:compiler/src/elements/elements.dart'; | 18 import 'package:compiler/src/elements/elements.dart'; |
19 import 'package:compiler/src/elements/visitor.dart'; | 19 import 'package:compiler/src/elements/visitor.dart'; |
20 import 'package:compiler/src/library_loader.dart' show LoadedLibraries; | 20 import 'package:compiler/src/library_loader.dart' show LoadedLibraries; |
21 import 'package:compiler/src/js_backend/backend.dart' show JavaScriptBackend; | |
22 import 'package:compiler/src/js_backend/lookup_map_analysis.dart' | 21 import 'package:compiler/src/js_backend/lookup_map_analysis.dart' |
23 show LookupMapResolutionAnalysis; | 22 show LookupMapResolutionAnalysis; |
24 import 'package:compiler/src/io/source_file.dart'; | 23 import 'package:compiler/src/io/source_file.dart'; |
25 import 'package:compiler/src/options.dart' show CompilerOptions; | 24 import 'package:compiler/src/options.dart' show CompilerOptions; |
26 import 'package:compiler/src/resolution/members.dart'; | 25 import 'package:compiler/src/resolution/members.dart'; |
27 import 'package:compiler/src/resolution/registry.dart'; | 26 import 'package:compiler/src/resolution/registry.dart'; |
28 import 'package:compiler/src/resolution/scope.dart'; | 27 import 'package:compiler/src/resolution/scope.dart'; |
29 import 'package:compiler/src/resolution/tree_elements.dart'; | 28 import 'package:compiler/src/resolution/tree_elements.dart'; |
30 import 'package:compiler/src/resolved_uri_translator.dart'; | 29 import 'package:compiler/src/resolved_uri_translator.dart'; |
31 import 'package:compiler/src/script.dart'; | 30 import 'package:compiler/src/script.dart'; |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 trustTypeAnnotations: trustTypeAnnotations, | 393 trustTypeAnnotations: trustTypeAnnotations, |
395 enableTypeAssertions: enableTypeAssertions, | 394 enableTypeAssertions: enableTypeAssertions, |
396 enableUserAssertions: enableUserAssertions, | 395 enableUserAssertions: enableUserAssertions, |
397 expectedErrors: expectedErrors, | 396 expectedErrors: expectedErrors, |
398 expectedWarnings: expectedWarnings, | 397 expectedWarnings: expectedWarnings, |
399 outputProvider: outputProvider); | 398 outputProvider: outputProvider); |
400 compiler.registerSource(uri, code); | 399 compiler.registerSource(uri, code); |
401 compiler.diagnosticHandler = createHandler(compiler, code); | 400 compiler.diagnosticHandler = createHandler(compiler, code); |
402 return compiler; | 401 return compiler; |
403 } | 402 } |
OLD | NEW |