| 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/implementation/elements/elements.dart"); |
| 10 #import("../../../lib/compiler/implementation/leg.dart"); | 10 #import("../../../lib/compiler/implementation/leg.dart"); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 | 98 |
| 99 void reportError(Node node, var message) { | 99 void reportError(Node node, var message) { |
| 100 if (message is String && message.startsWith("no #library tag found in")) { | 100 if (message is String && message.startsWith("no #library tag found in")) { |
| 101 // TODO(ahe): Fix the MockCompiler to not have this problem. | 101 // TODO(ahe): Fix the MockCompiler to not have this problem. |
| 102 return; | 102 return; |
| 103 } | 103 } |
| 104 errors.add(new WarningMessage(node, message.message)); | 104 errors.add(new WarningMessage(node, message.message)); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void reportDiagnostic(SourceSpan span, String message, bool fatal) { | 107 void reportDiagnostic(SourceSpan span, String message, var kind) { |
| 108 print(message); | 108 print(message); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void clearWarnings() { | 111 void clearWarnings() { |
| 112 warnings = []; | 112 warnings = []; |
| 113 } | 113 } |
| 114 | 114 |
| 115 void clearErrors() { | 115 void clearErrors() { |
| 116 errors = []; | 116 errors = []; |
| 117 } | 117 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 importLibrary(library, compiler.coreLibrary, compiler); | 200 importLibrary(library, compiler.coreLibrary, compiler); |
| 201 return library; | 201 return library; |
| 202 } | 202 } |
| 203 | 203 |
| 204 class StringScript extends Script { | 204 class StringScript extends Script { |
| 205 final String code; | 205 final String code; |
| 206 StringScript(this.code) : super(null, null); | 206 StringScript(this.code) : super(null, null); |
| 207 String get text() => code; | 207 String get text() => code; |
| 208 String get name() => "mock script"; | 208 String get name() => "mock script"; |
| 209 } | 209 } |
| OLD | NEW |