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

Side by Side Diff: packages/petitparser/lib/src/lisp/name.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 part of lisp; 1 part of petitparser.lisp;
2 2
3 /** 3 /// An unique symbolic name.
4 * An unique symbolic name.
5 */
6 class Name { 4 class Name {
7 5
8 /** The interned symbols. */ 6 /// The interned symbols.
9 static final Map<String, Name> _interned = new HashMap(); 7 static final Map<String, Name> _interned = new HashMap();
10 8
11 /** Factory for new symbol cells. */ 9 /// Factory for new symbol cells.
12 factory Name(String name) { 10 factory Name(String name) {
13 return _interned.putIfAbsent(name, () => new Name._internal(name)); 11 return _interned.putIfAbsent(name, () => new Name._internal(name));
14 } 12 }
15 13
16 /** The name of the symbol. */ 14 /// The name of the symbol.
17 final String _name; 15 final String _name;
18 16
19 /** Internal constructor for symbol. */ 17 /// Internal constructor for symbol.
20 Name._internal(this._name); 18 Name._internal(this._name);
21 19
22 /** Returns the string representation of the symbolic name. */ 20 /// Returns the string representation of the symbolic name.
23 String toString() => _name; 21 String toString() => _name;
24 } 22 }
OLDNEW
« no previous file with comments | « packages/petitparser/lib/src/lisp/grammar.dart ('k') | packages/petitparser/lib/src/lisp/natives.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698