From 78c2dbc5244354b87311a782c72bcfb446dc9424 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 23 Nov 2011 11:46:58 +0800 Subject: [PATCH] JSDOC/ScopeNamer.js --- JSDOC/ScopeNamer.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/JSDOC/ScopeNamer.js b/JSDOC/ScopeNamer.js index fa1f1f6..d1b7d36 100644 --- a/JSDOC/ScopeNamer.js +++ b/JSDOC/ScopeNamer.js @@ -132,8 +132,18 @@ ScopeNamer = XObject.define( this.debugCall("walkStatements :" + scope ) ; var _this = this; var res = false; - + var isGlobal = scope == '_global_'; + statements.some(function(st ) { + + if (isGlobal && + st[0].jsdoc && + st[0].jsdoc.getTag('scope').length + ) { + + print("GOT scope"); + print(st[0].jsdoc.getTag('scope')); + } res = _this.walkStatement(scope, st); @@ -169,6 +179,8 @@ ScopeNamer = XObject.define( print("GOT ignore?"); return true; } + + while (null != (token = this.next())) { //'function' -- 2.39.2