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); |
-} |