A Context object used to keep state when parsing symbols. The context should not be used directly by user code.
function (){ this.scopes = {}; this.nameSpaces = {global:[]}; this.aliases = {}; this.activateScope("global"); }
Activates a scope for.
ArgumentsObject
the activated scope object.function (name){ this.activeScope = name; return this.addScope(name); }
Adds a namespace the the context object.
ArgumentsObject
the object for the namespace.function (name){ if ("undefined" === typeof this.nameSpaces[name]) { this.nameSpaces[name] = {}; } return this.nameSpaces[name]; }
Adds a scope to the context
ArgumentsObject
the object for the namespace.function (name){ if ("undefined" === typeof this.scopes[name]) { this.scopes[name] = {}; } return this.scopes[name]; }
Returns the active scope.
ReturnsObject
the scope objectfunction (){ return this.getScope(this.activeScope); }
Returns the name of the active scope.
ReturnsString
the active scope name.function (){ return this.activeScope; }
Gets a namespace, creating it if it does not exist.
ArgumentsObject
the object for the namespace.function (name){ return this.addNamespace(name); }
Gets a scope creating it if it does not exist.
ArgumentsObject
the object for the namespace.function (name){ return this.addScope(name); }
MIT LICENSE
Code: git clone git://github.com/pollenware/coddoc.git