File size: 537 Bytes
e1d589b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | /**
* 执行上下文
* @returns {Function}
* @constructor
* @require System,Object;
*/
function Context( name )
{
var current = function(name){
var children = current.children || (current.children={});
var c = children[name];
if( !c )
{
c= children[name] = Context(name);
c.parent = current;
c.root = current.root || current;
}
return c;
};
current.label = name;
current.parent = null;
current.scope = {};
return current;
} |