Small tweaks required to get ready for upgrade to rhino 1.7r4.

This commit is contained in:
Michael Mathews 2012-07-04 23:53:19 +01:00
parent 81f145708d
commit 901d17baa3
3 changed files with 8 additions and 6 deletions

1
jsdoc
View File

@ -8,6 +8,7 @@ BASEPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# for whatever reason, Rhino requires module paths to be valid URIs
URLPATH="file://"$BASEPATH
URLPATH=`echo "$URLPATH" | sed -e 's/ /%20/g'`
ENCODEDBASEPATH=`echo "$BASEPATH" | sed -e 's/ /%20/g'`
if test $1 = "--debug"
then

View File

@ -76,7 +76,7 @@ function include(filepath) {
load(filepath);
}
catch (e) {
console.log('Cannot include "' + __dirname + '/' + filepath + '": '+e);
console.log('Cannot include "' + filepath + '": '+e);
}
}
include.resolve = function(filepath) {

View File

@ -349,7 +349,7 @@ function visitNode(node) {
else if (node.type === Token.ASSIGN) {
e = {
id: 'astnode'+node.hashCode(), // the id of the ASSIGN node
comment: String(node.jsDoc||'@undocumented'),
comment: String(node.getJsDoc()||'@undocumented'),
lineno: node.left.getLineno(),
filename: currentSourceName,
astnode: node,
@ -365,7 +365,7 @@ function visitNode(node) {
else if (node.type === Token.COLON) { // assignment within an object literal
e = {
id: 'astnode'+node.hashCode(), // the id of the COLON node
comment: String(node.left.jsDoc||'@undocumented'),
comment: String(node.left.getJsDoc()||'@undocumented'),
lineno: node.left.getLineno(),
filename: currentSourceName,
astnode: node,
@ -382,12 +382,13 @@ function visitNode(node) {
if (node.parent.variables.toArray()[0] === node) { // like /** blah */ var a=1, b=2, c=3;
// the first var assignment gets any jsDoc before the whole var series
node.jsDoc = node.parent.jsDoc;
if (typeof node.setJsDoc !== 'undefined') { node.setJsDoc( node.parent.getJsDoc() ); }
//node.jsDoc = node.parent.jsDoc;
}
e = {
id: 'astnode'+node.hashCode(), // the id of the VARIABLE node
comment: String(node.jsDoc||'@undocumented'),
comment: String(node.getJsDoc()||'@undocumented'),
lineno: node.getLineno(),
filename: currentSourceName,
astnode: node,
@ -412,7 +413,7 @@ function visitNode(node) {
else if (node.type == Token.FUNCTION || node.type == tkn.NAMEDFUNCTIONSTATEMENT) {
e = {
id: 'astnode'+node.hashCode(), // the id of the COLON node
comment: String(node.jsDoc||'@undocumented'),
comment: String(node.getJsDoc()||'@undocumented'),
lineno: node.getLineno(),
filename: currentSourceName,
astnode: node,