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

Side by Side 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: Disallow symbols with private parts. Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/internal/symbol.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.core; 5 part of dart.core;
6 6
7 /// Opaque name used by mirrors, invocations and [Function.apply]. 7 /// Opaque name used by mirrors, invocations and [Function.apply].
8 class Symbol { 8 class Symbol {
9 /** 9 /**
10 * Constructs a new Symbol. 10 * Constructs a new Symbol.
11 * 11 *
12 * An [ArgumentError] is thrown if [name] starts with an underscore, or if 12 * The name must be a valid public Dart member name,
13 * [name] is not a [String]. An [ArgumentError] is thrown if [name] is not 13 * public constructor name, or library name.
14 * an empty string and is not a valid qualified identifier optionally 14 * That means that the content of the [name] String must be either
15 * followed by [:'=':]. 15 *
16 * * a valid Dart identifier not starting with "`_`",
17 * * such an identifier followed by "=" (a setter name),
18 * * or the name of an operator
19 * (one of "`+`", "`-`", "`*`", "`/`", "`%`", "`~/`", "`&`", "`|`",
20 * "`^`", "`~`", "`<<`", "`>>`", "`<`", "`<=`", "`>`", "`>=`", "`==`",
21 * "`[]`", "`[]=`", or "`unary-`"),
22 * * The empty string (the default constructor name), or
23 * * A '`.`' separated sequence of identifiers (a library name). This must
24 * also not begin with an underscore ("`_`").
ahe 2014/02/21 08:11:14 We should also support things like: mylibrary.myc
16 * 25 *
17 * The following text is non-normative: 26 * The following text is non-normative:
18 * 27 *
19 * Creating non-const Symbol instances may result in larger output. If 28 * Creating non-const Symbol instances may result in larger output. If
20 * possible, use [MirrorsUsed] in "dart:mirrors" to specify which names might 29 * possible, use [MirrorsUsed] in "dart:mirrors" to specify which names might
21 * be passed to this constructor. 30 * be passed to this constructor.
22 */ 31 */
23 const factory Symbol(String name) = internal.Symbol; 32 const factory Symbol(String name) = internal.Symbol;
24 } 33 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/internal/symbol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698