rem: m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/); 
add: m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/); 
context: function processFile(f, fname, inputdir, out) {	var s;	var firstLine = true;	indexFileArray[fname] = "";	    // write the header of the output file	out.writeLine('<HTML><HEADER><TITLE>' + fname + '</TITLE><BODY>');	if (inputdir != null) {	  outstr = '<a name=\"_top_\"></a><pre><a href=\"' + indexFile + '\">Index Files</a> '; 	  outstr += '<a href=\"' + indexFunction + '\">Index Functions</a></pre><hr>';      out.writeLine(outstr);	}    // process the input file	var comment = "";	while ((s = f.readLine()) != null) {      var m = s.match(/\/\*\*(.*)/);	  if (m != null) {		  // Found a comment start.		  s = "*" + m[1];		  do {			m = s.match(/(.*)\*\//);			if (m != null) {			  // Found end of comment.			  comment += m[1];			  break;			}			// Strip leading whitespace and "*".			comment += s.replace(/^\s*\*/, "");			s = f.readLine();		  } while (s != null);	    	  if (debug)          print("Found comment " + comment);		  if (firstLine) {			// We have a comment for the whole file.			out.writeLine('<H1>File ' + fname + '</H1>');			out.writeLine(processComment(comment,firstLine,fname));			out.writeLine('<HR>');			firstLine = false;			comment = "";			continue;		  }	  }	  // match the beginning of the function	  // NB we also match functions without a comment!	  // if we have two comments one after another only the last one will be taken	  m = s.match(/^\s*function\s+((\w+)|(\w+)(\s+))\(([^)]*)\)/);	  if (m != null)	  {        // Found a function start		var htmlText = processFunction(m[1], m[2], comment);		// Save the text in a global variable, so we		// can write out a table of contents first.		functionDocArray[functionDocArray.length] = 				{name:m[1], text:htmlText};					// Store the function also in the indexFunctionArray 		// so we can have a seperate file with the function table of contents		if (indexFunctionArray[m[1]]) { 			//  print("ERROR: function: " + m[1] + " is defined more than once!");			// Allow multiple files for a function			  with (indexFunctionArray[m[1]]) {			    filename = filename + "|" + fname;				// print("filename = " + filename);			  }		} else {			  indexFunctionArray[m[1]] = 					{filename:fname};        }		//reset comment 		comment = "";      }  	  firstLine = false;	}	// Write table of contents.	for (var i=0; i < functionDocArray.length; i++) {		with (functionDocArray[i]) {			out.writeLine('function <A HREF=#' + name +				      '>' + name + '</A><BR>');		}	}	out.writeLine('<HR>');	// Now write the saved function documentation.	for (i=0; i < functionDocArray.length; i++) {		with (functionDocArray[i]) {			out.writeLine('<A NAME=' + name + '>');			out.writeLine(text);		}	}	out.writeLine('</BODY></HTML>');	// Now clean up the doc array	functionDocArray = [];  }
meta: 1953	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1953/fe144764a599bc20400949a3a41c0a62884305da/jsdoc.js/clean/examples/jsdoc.js