| 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 "dart:uri"; | 7 import "dart:uri"; |
| 8 | 8 |
| 9 import "../../../lib/compiler/implementation/elements/elements.dart"; | 9 import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t"; |
| 10 import "../../../lib/compiler/implementation/tree/tree.dart"; | 10 import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart"; |
| 11 import "../../../lib/compiler/implementation/scanner/scannerlib.dart"; | 11 import "../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt"; |
| 12 import "../../../lib/compiler/implementation/dart2jslib.dart" hide SourceString; | 12 import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart" |
| 13 import "../../../lib/compiler/implementation/source_file.dart"; | 13 hide SourceString; |
| 14 import "../../../lib/compiler/implementation/util/util.dart"; | 14 import "../../../sdk/lib/_internal/compiler/implementation/source_file.dart"; |
| 15 import "../../../sdk/lib/_internal/compiler/implementation/util/util.dart"; |
| 15 | 16 |
| 16 export "../../../lib/compiler/implementation/dart2jslib.dart" | 17 export "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart" |
| 17 show DiagnosticListener; | 18 show DiagnosticListener; |
| 18 // TODO(ahe): We should have token library to export instead. | 19 // TODO(ahe): We should have token library to export instead. |
| 19 export "../../../lib/compiler/implementation/scanner/scannerlib.dart"; | 20 export "../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt"; |
| 20 | 21 |
| 21 class LoggerCanceler implements DiagnosticListener { | 22 class LoggerCanceler implements DiagnosticListener { |
| 22 void cancel(String reason, {node, token, instruction, element}) { | 23 void cancel(String reason, {node, token, instruction, element}) { |
| 23 throw new CompilerCancelledException(reason); | 24 throw new CompilerCancelledException(reason); |
| 24 } | 25 } |
| 25 | 26 |
| 26 void log(message) { | 27 void log(message) { |
| 27 print(message); | 28 print(message); |
| 28 } | 29 } |
| 29 } | 30 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 NodeList fullParseUnit(String source) { | 88 NodeList fullParseUnit(String source) { |
| 88 return parseBodyCode(source, (parser, tokens) => parser.parseUnit(tokens)); | 89 return parseBodyCode(source, (parser, tokens) => parser.parseUnit(tokens)); |
| 89 } | 90 } |
| 90 | 91 |
| 91 // TODO(ahe): We define this method to avoid having to import | 92 // TODO(ahe): We define this method to avoid having to import |
| 92 // the scanner in the tests. We should move SourceString to another | 93 // the scanner in the tests. We should move SourceString to another |
| 93 // location instead. | 94 // location instead. |
| 94 SourceString buildSourceString(String name) { | 95 SourceString buildSourceString(String name) { |
| 95 return new SourceString(name); | 96 return new SourceString(name); |
| 96 } | 97 } |
| OLD | NEW |