Object,
{
+ _index : false,
+
+
init : function() {
this._index = {};
},
- keys : function() {
+ keys : function()
+ {
var found = [];
for (var p in this._index) {
found.push(p);
hasSymbol : function(alias) {
- return this.keys().indexOf(alias) > -1;
+ return typeof(this._index[alias]) != 'undefined';
+ //return this.keys().indexOf(alias) > -1;
},
addSymbol : function(symbol) {
}
return found;
},
+ /**
+ * for serializing
+ */
+ toObject : function() {
+ var ret = {}
+ for (var p in this._index) {
+ ret[p] = p.toObject();
+ }
+ return ret;
+ },
+
deleteSymbol : function(alias) {
if (!this.hasSymbol(alias)) return;
addAugments(symbol.augments, true);
//while(addAugments(symbol.augments) > 0) { }
- },
-
- toArray : function()
- {
-
- }
+ }
+
})
SymbolSet.isBuiltin = function(name) {