| 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('parser_helper'); | 5 #library('parser_helper'); |
| 6 | 6 |
| 7 #import("../../../../lib/uri/uri.dart"); | 7 #import("../../../../lib/uri/uri.dart"); |
| 8 | 8 |
| 9 #import("../../../leg/elements/elements.dart"); | 9 #import("../../../../lib/compiler/implementation/elements/elements.dart"); |
| 10 #import("../../../leg/tree/tree.dart"); | 10 #import("../../../../lib/compiler/implementation/tree/tree.dart"); |
| 11 #import('../../../leg/scanner/scannerlib.dart'); | 11 #import('../../../../lib/compiler/implementation/scanner/scannerlib.dart'); |
| 12 #import("../../../leg/leg.dart"); | 12 #import("../../../../lib/compiler/implementation/leg.dart"); |
| 13 #import("../../../leg/util/util.dart"); | 13 #import("../../../../lib/compiler/implementation/util/util.dart"); |
| 14 | 14 |
| 15 class LoggerCanceler implements DiagnosticListener { | 15 class LoggerCanceler implements DiagnosticListener { |
| 16 void cancel([String reason, node, token, instruction]) { | 16 void cancel([String reason, node, token, instruction]) { |
| 17 throw new CompilerCancelledException(reason); | 17 throw new CompilerCancelledException(reason); |
| 18 } | 18 } |
| 19 | 19 |
| 20 void log(message) { | 20 void log(message) { |
| 21 print(message); | 21 print(message); |
| 22 } | 22 } |
| 23 } | 23 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 compiler.withCurrentElement(unit, () => parser.parseUnit(tokens)); | 64 compiler.withCurrentElement(unit, () => parser.parseUnit(tokens)); |
| 65 return unit.topLevelElements; | 65 return unit.topLevelElements; |
| 66 } | 66 } |
| 67 | 67 |
| 68 // TODO(ahe): We define this method to avoid having to import | 68 // TODO(ahe): We define this method to avoid having to import |
| 69 // the scanner in the tests. We should move SourceString to another | 69 // the scanner in the tests. We should move SourceString to another |
| 70 // location instead. | 70 // location instead. |
| 71 SourceString buildSourceString(String name) { | 71 SourceString buildSourceString(String name) { |
| 72 return new SourceString(name); | 72 return new SourceString(name); |
| 73 } | 73 } |
| OLD | NEW |