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

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

Issue 140643006: Update documentation on Symbol. Make validation match. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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: sdk/lib/core/symbol.dart
diff --git a/sdk/lib/core/symbol.dart b/sdk/lib/core/symbol.dart
index c92001af498dd2c8ffdff3761f09cfc16965311a..86709920fc8152c664528e92fe02f134bf22f74c 100644
--- a/sdk/lib/core/symbol.dart
+++ b/sdk/lib/core/symbol.dart
@@ -9,10 +9,19 @@ 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
- * an empty string and is not a valid qualified identifier optionally
- * followed by [:'=':].
+ * The name must be a valid public Dart member name,
+ * public constructor name, or library name.
+ * That means that the content of the [name] String must be either
+ *
+ * * a valid Dart identifier not starting with "`_`",
+ * * such an identifier followed by "=" (a setter name),
+ * * or the name of an operator
+ * (one of "`+`", "`-`", "`*`", "`/`", "`%`", "`~/`", "`&`", "`|`",
+ * "`^`", "`~`", "`<<`", "`>>`", "`<`", "`<=`", "`>`", "`>=`", "`==`",
+ * "`[]`", "`[]=`", or "`unary-`"),
+ * * The empty string (the default constructor name), or
+ * * A '`.`' separated sequence of identifiers (a library name). This must
+ * also not begin with an underscore ("`_`").
floitsch 2014/01/31 14:37:24 Why is _foo.bar not allowed, but foo._bar is?
Lasse Reichstein Nielsen 2014/01/31 18:19:26 Because I saw no need to disallow foo._bar. The pr
ahe 2014/02/13 21:56:54 I don't think this is correct, and I look forward
*
* The following text is non-normative:
*

Powered by Google App Engine
This is Rietveld 408576698