Index: pkg/compiler/lib/src/id_generator.dart |
diff --git a/pkg/compiler/lib/src/id_generator.dart b/pkg/compiler/lib/src/id_generator.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4c92ea9dbfa69023c9908c80dd778e111b3ae0dd |
--- /dev/null |
+++ b/pkg/compiler/lib/src/id_generator.dart |
@@ -0,0 +1,13 @@ |
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+/// A generator of globally unique identifiers. |
+class IdGenerator { |
+ int _nextFreeId = 0; |
+ |
+ /// Returns the next free identifier. |
+ /// |
+ /// This identifier is guaranteed to be unique. |
+ int getNextFreeId() => _nextFreeId++; |
+} |