Index: pkg/compiler/lib/src/parser/element_listener.dart |
diff --git a/pkg/compiler/lib/src/parser/element_listener.dart b/pkg/compiler/lib/src/parser/element_listener.dart |
index 30d155cf9fe216c997d003594b3235b3d6d8f504..1554f9e23feb5329353f024fa06a289ef8db7455 100644 |
--- a/pkg/compiler/lib/src/parser/element_listener.dart |
+++ b/pkg/compiler/lib/src/parser/element_listener.dart |
@@ -19,6 +19,7 @@ import '../elements/modelx.dart' |
LibraryElementX, |
NamedMixinApplicationElementX, |
VariableList; |
+import '../id_generator.dart'; |
import '../native/native.dart' as native; |
import '../string_validator.dart' show StringValidator; |
import '../tokens/keyword.dart' show Keyword; |
@@ -39,8 +40,6 @@ import 'partial_elements.dart' |
PartialTypedefElement; |
import 'listener.dart' show closeBraceFor, Listener, ParserError, VERBOSE; |
-typedef int IdGenerator(); |
- |
/// Options used for scanning. |
/// |
/// Use this to conditionally support special tokens. |
@@ -171,7 +170,7 @@ class ElementListener extends Listener { |
NodeList names = makeNodeList(count, enumKeyword.next.next, endBrace, ","); |
Identifier name = popNode(); |
- int id = idGenerator(); |
+ int id = idGenerator.getNextFreeId(); |
Element enclosing = compilationUnitElement; |
pushElement(new EnumClassElementX( |
name.source, enclosing, id, new Enum(enumKeyword, name, names))); |
@@ -249,7 +248,7 @@ class ElementListener extends Listener { |
popNode(); // superType |
popNode(); // typeParameters |
Identifier name = popNode(); |
- int id = idGenerator(); |
+ int id = idGenerator.getNextFreeId(); |
PartialClassElement element = new PartialClassElement( |
name.source, beginToken, endToken, compilationUnitElement, id); |
pushElement(element); |
@@ -290,7 +289,7 @@ class ElementListener extends Listener { |
classKeyword, |
endToken); |
- int id = idGenerator(); |
+ int id = idGenerator.getNextFreeId(); |
Element enclosing = compilationUnitElement; |
pushElement(new NamedMixinApplicationElementX( |
name.source, enclosing, id, namedMixinApplication)); |