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 dart2js.test.message_kind_helper; | 5 library dart2js.test.message_kind_helper; |
6 | 6 |
7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 | 9 |
10 import 'package:compiler/src/compiler.dart' show | 10 import 'package:compiler/src/compiler.dart' show |
11 Compiler; | 11 Compiler; |
12 import 'package:compiler/src/messages.dart' show | 12 import 'package:compiler/src/dart_backend/dart_backend.dart' show |
| 13 DartBackend; |
| 14 import 'package:compiler/src/diagnostics/messages.dart' show |
13 MessageKind, | 15 MessageKind, |
14 MessageTemplate; | 16 MessageTemplate; |
15 import 'package:compiler/src/dart_backend/dart_backend.dart' show | |
16 DartBackend; | |
17 import 'package:compiler/src/old_to_new_api.dart' show | 17 import 'package:compiler/src/old_to_new_api.dart' show |
18 LegacyCompilerDiagnostics; | 18 LegacyCompilerDiagnostics; |
19 | 19 |
20 import 'memory_compiler.dart'; | 20 import 'memory_compiler.dart'; |
21 | 21 |
22 const String ESCAPE_REGEXP = r'[[\]{}()*+?.\\^$|]'; | 22 const String ESCAPE_REGEXP = r'[[\]{}()*+?.\\^$|]'; |
23 | 23 |
24 /// Most examples generate a single diagnostic. | 24 /// Most examples generate a single diagnostic. |
25 /// Add an exception here if a single diagnostic cannot be produced. | 25 /// Add an exception here if a single diagnostic cannot be produced. |
26 /// However, consider that a single concise diagnostic is easier to understand, | 26 /// However, consider that a single concise diagnostic is easier to understand, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 kindsWithPendingClasses.contains(template)); | 142 kindsWithPendingClasses.contains(template)); |
143 | 143 |
144 if (!pendingStuff) { | 144 if (!pendingStuff) { |
145 // If there is pending stuff, or the compiler was cancelled, we | 145 // If there is pending stuff, or the compiler was cancelled, we |
146 // shouldn't reuse the compiler. | 146 // shouldn't reuse the compiler. |
147 cachedCompiler = compiler; | 147 cachedCompiler = compiler; |
148 } | 148 } |
149 }); | 149 }); |
150 }).then((_) => cachedCompiler); | 150 }).then((_) => cachedCompiler); |
151 } | 151 } |
OLD | NEW |