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

Unified Diff: dart/sdk/lib/core/symbol.dart

Issue 14142003: Add Symbol class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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: dart/sdk/lib/core/symbol.dart
diff --git a/dart/sdk/lib/core/symbol.dart b/dart/sdk/lib/core/symbol.dart
new file mode 100644
index 0000000000000000000000000000000000000000..d3db8f35dee89dc1b448b588bc6f2967d7569926
--- /dev/null
+++ b/dart/sdk/lib/core/symbol.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
kasperl 2013/04/11 10:48:58 2013
ahe 2013/04/11 11:26:06 Done.
+// 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.
+
+part of dart.core;
+
+/// Opaque name used by mirrors, invocations and [Function.apply].
+class Symbol {
+
+ /**
+ * Constructs a new Symbol.
+ *
+ * An [ArgumentError] is thrown if [name] starts with an underscore,
+ * or if [name] is not a [String]. An [ArgumentError] is thrown if
+ * [name] is not the empty string and is not a valid identifier
+ * optionally followed by [:'=':].
kasperl 2013/04/11 10:48:58 Do we expect to need the = suffix long term?
ahe 2013/04/11 11:26:06 It's in the specification.
+ */
+ external const Symbol(String name);
+}

Powered by Google App Engine
This is Rietveld 408576698