Added some internal debugging features. FIX: Added initialiser for variable that sometimes caused an error to be thrown when it was undefined. Closes #24.

This commit is contained in:
Michael Mathews 2011-08-30 08:41:41 +01:00
parent 008905765d
commit 90ac234799
4 changed files with 7 additions and 3 deletions

4
jsdoc
View File

@ -3,4 +3,6 @@
# rhino discards the path to the current script file, so we must add it back
PWD=`pwd`
BASEDIR=`dirname $0`
java -classpath ${BASEDIR}/lib/js.jar org.mozilla.javascript.tools.shell.Main -debug ${BASEDIR}/jsdoc.js --dirname=${PWD}/${BASEDIR} $@
java -classpath ${BASEDIR}/lib/js.jar org.mozilla.javascript.tools.shell.Main -debug ${BASEDIR}/jsdoc.js --dirname=${PWD}/${BASEDIR} $@
#java -classpath ${BASEDIR}/lib/js.jar org.mozilla.javascript.tools.debugger.Main -debug ${BASEDIR}/jsdoc.js --dirname=${PWD}/${BASEDIR} $@

View File

@ -37,6 +37,8 @@
require._root.unshift(toDir(moduleUrl));
(function(__dirname) {
/*debug*///var lineno=1;print('\n== '+moduleUrl+' ===============\n1'+moduleContent.replace(/(\n)/g, function(m, i){return '\n'+(++lineno);}));
f.call({}, require, exports, module, __dirname);
})(require._root[0]);
require._root.shift();

View File

@ -1,7 +1,7 @@
{
"name": "JSDoc",
"version": "3.0.0alpha",
"revision": "1314647574958",
"revision": "1314689969938",
"description": "An automatic documentation generator for javascript.",
"keywords": [ "documentation", "javascript" ],
"licenses": [

View File

@ -152,7 +152,7 @@
(longname.match( /^(:?(.+)([#.~]))?(.+?)$/ ) || []).reverse()
: [''];
var name = parts[0],
var name = parts[0] || '', // ensure name is always initialised to avoid error being thrown when calling replace on undefined [gh-24]
scope = parts[1] || '', // ., ~, or #
memberof = parts[2] || '',
variation;