Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: tests/compiler/dart2js/parser_helper.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/parser_helper.dart
diff --git a/tests/compiler/dart2js/parser_helper.dart b/tests/compiler/dart2js/parser_helper.dart
index 3d8a3535c7f29de71208191b6a256dec0e7cfe7f..94c3b5760a4c5fa182f7faf1c35e6d22b8a6face 100644
--- a/tests/compiler/dart2js/parser_helper.dart
+++ b/tests/compiler/dart2js/parser_helper.dart
@@ -16,8 +16,7 @@ import "../../../sdk/lib/_internal/compiler/implementation/elements/modelx.dart"
show CompilationUnitElementX,
LibraryElementX;
-import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart"
- hide SourceString;
+import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart";
export "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart"
show DiagnosticListener;
@@ -60,7 +59,7 @@ class LoggerCanceler implements DiagnosticListener {
withCurrentElement(Element element, f()) => f();
}
-Token scan(String text) => new StringScanner(text).tokenize();
+Token scan(String text) => new StringScanner.fromString(text).tokenize();
Node parseBodyCode(String text, Function parseMethod,
{DiagnosticListener diagnosticHandler}) {
@@ -98,7 +97,7 @@ Node parseMember(String text, {DiagnosticListener diagnosticHandler}) {
diagnosticHandler: diagnosticHandler);
}
-class MockFile extends SourceFile {
+class MockFile extends StringSourceFile {
MockFile(text)
: super('<string>', text);
}
@@ -126,10 +125,3 @@ NodeList fullParseUnit(String source, {DiagnosticListener diagnosticHandler}) {
return parseBodyCode(source, (parser, tokens) => parser.parseUnit(tokens),
diagnosticHandler: diagnosticHandler);
}
-
-// TODO(ahe): We define this method to avoid having to import
-// the scanner in the tests. We should move SourceString to another
-// location instead.
-SourceString buildSourceString(String name) {
- return new SourceString(name);
-}

Powered by Google App Engine
This is Rietveld 408576698