Index: tests/compiler/dart2js/parser_helper.dart |
diff --git a/tests/compiler/dart2js/parser_helper.dart b/tests/compiler/dart2js/parser_helper.dart |
index d6e19538e6a5bf442b6c9266c3851559705c7942..028fa065c351f1ae20b2c4399ed3f635ef2296ac 100644 |
--- a/tests/compiler/dart2js/parser_helper.dart |
+++ b/tests/compiler/dart2js/parser_helper.dart |
@@ -7,6 +7,7 @@ library parser_helper; |
import "package:expect/expect.dart"; |
import "package:compiler/src/elements/elements.dart"; |
+import 'package:compiler/src/id_generator.dart'; |
import "package:compiler/src/tree/tree.dart"; |
import "package:compiler/src/parser/element_listener.dart"; |
import "package:compiler/src/parser/node_listener.dart"; |
@@ -150,11 +151,10 @@ Link<Element> parseUnit(String text, Compiler compiler, |
} |
var script = new Script(uri, uri, new MockFile(text)); |
var unit = new CompilationUnitElementX(script, library); |
- int id = 0; |
DiagnosticReporter reporter = compiler.reporter; |
ElementListener listener = new ElementListener( |
compiler.parsing.getScannerOptionsFor(library), |
- reporter, unit, () => id++); |
+ reporter, unit, new IdGenerator()); |
PartialParser parser = new PartialParser(listener, new MockParserOptions()); |
reporter.withCurrentElement(unit, () => parser.parseUnit(tokens)); |
return unit.localMembers; |