From: Alan Knowles Date: Tue, 20 Jul 2010 22:09:54 +0000 (+0800) Subject: JSDOC/BuildDocs.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=45c0ed1c69f84180cc47c7d35957faff5cb223d6 JSDOC/BuildDocs.js --- diff --git a/JSDOC/BuildDocs.js b/JSDOC/BuildDocs.js index b9fd6cc..d9eb5e4 100644 --- a/JSDOC/BuildDocs.js +++ b/JSDOC/BuildDocs.js @@ -18,8 +18,7 @@ TokenStream = imports.TokenStream.TokenStream; Symbol = imports.Symbol.Symbol; DocComment = imports.DocComment.DocComment; -/****************** INCLUDES ARE ALL AT THE BOTTOM OF THIS FILE!!!!! *******************/ - + // should not realy be here -- or anywhere...?? function makeSortby(attribute) { @@ -68,7 +67,10 @@ BuildDocs = { }, - + /** + * create a list of files in this.srcFiles using list of directories / files in Options.src + * + */ _getSrcFiles : function() { @@ -97,6 +99,10 @@ BuildDocs = { //Seed.print(JSON.stringify(this.srcFiles, null,4));Seed.quit(); return this.srcFiles; }, + /** + * Parse the source files. + * + */ _parseSrcFiles : function() { @@ -107,12 +113,13 @@ BuildDocs = { var srcFile = this.srcFiles[i]; - var cacheFile = Options.cacheDirectory + srcFile.replace(/\//g, '_') + ".cache"; + var cacheFile = !Options.cacheDirectory.length ? false : + Options.cacheDirectory + srcFile.replace(/\//g, '_') + ".cache"; //println(cacheFile); // disabled at present!@!! - if (false && !Options.disablecache && File.exists(cacheFile)) { + if (cacheFile && File.exists(cacheFile)) { // check filetime? var c_mt = File.getTimes(cacheFile); @@ -153,7 +160,7 @@ BuildDocs = { var ts = new TokenStream(tr.tokenize(txs)); Parser.parse(ts, srcFile); - + //var outstr = JSON.stringify( // Parser.filesSymbols[srcFile]._index //);