| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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:uri"); | 7 import 'dart:uri'; |
| 8 | 8 |
| 9 #import("../../../lib/compiler/implementation/elements/elements.dart"); | 9 import '../../../lib/compiler/compiler.dart' as api; |
| 10 #import("../../../lib/compiler/implementation/leg.dart"); | 10 import '../../../lib/compiler/implementation/dart2jslib.dart' hide TreeElementMa
pping; |
| 11 #import('../../../lib/compiler/implementation/source_file.dart'); | 11 import '../../../lib/compiler/implementation/elements/elements.dart'; |
| 12 #import("../../../lib/compiler/implementation/tree/tree.dart"); | 12 import '../../../lib/compiler/implementation/resolution/resolution.dart'; |
| 13 #import("../../../lib/compiler/implementation/util/util.dart"); | 13 import '../../../lib/compiler/implementation/source_file.dart'; |
| 14 #import('../../../lib/compiler/compiler.dart', prefix: 'api'); | 14 import '../../../lib/compiler/implementation/tree/tree.dart'; |
| 15 #import("parser_helper.dart"); | 15 import '../../../lib/compiler/implementation/util/util.dart'; |
| 16 import 'parser_helper.dart'; |
| 16 | 17 |
| 17 class WarningMessage { | 18 class WarningMessage { |
| 18 Node node; | 19 Node node; |
| 19 Message message; | 20 Message message; |
| 20 WarningMessage(this.node, this.message); | 21 WarningMessage(this.node, this.message); |
| 21 | 22 |
| 22 toString() => message.toString(); | 23 toString() => message.toString(); |
| 23 } | 24 } |
| 24 | 25 |
| 25 const String DEFAULT_HELPERLIB = r''' | 26 const String DEFAULT_HELPERLIB = r''' |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 }); | 227 }); |
| 227 } | 228 } |
| 228 } | 229 } |
| 229 | 230 |
| 230 LibraryElement mockLibrary(Compiler compiler, String source) { | 231 LibraryElement mockLibrary(Compiler compiler, String source) { |
| 231 Uri uri = new Uri.fromComponents(scheme: "source"); | 232 Uri uri = new Uri.fromComponents(scheme: "source"); |
| 232 var library = new LibraryElement(new Script(uri, new MockFile(source))); | 233 var library = new LibraryElement(new Script(uri, new MockFile(source))); |
| 233 importLibrary(library, compiler.coreLibrary, compiler); | 234 importLibrary(library, compiler.coreLibrary, compiler); |
| 234 return library; | 235 return library; |
| 235 } | 236 } |
| OLD | NEW |