| OLD | NEW |
| (Empty) |
| 1 part of petitparser.lisp; | |
| 2 | |
| 3 /// An unique symbolic name. | |
| 4 class Name { | |
| 5 | |
| 6 /// The interned symbols. | |
| 7 static final Map<String, Name> _interned = new HashMap(); | |
| 8 | |
| 9 /// Factory for new symbol cells. | |
| 10 factory Name(String name) { | |
| 11 return _interned.putIfAbsent(name, () => new Name._internal(name)); | |
| 12 } | |
| 13 | |
| 14 /// The name of the symbol. | |
| 15 final String _name; | |
| 16 | |
| 17 /// Internal constructor for symbol. | |
| 18 Name._internal(this._name); | |
| 19 | |
| 20 /// Returns the string representation of the symbolic name. | |
| 21 String toString() => _name; | |
| 22 } | |
| OLD | NEW |