X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FCompressWhite.js;h=d5dca8afc2c6807ed940722df663c01eeb5e1ed1;hb=1c112ad8d5cecd0351642c79419edab08e1a9074;hp=38d377022304020e5c9c9c63ff4420f704dc1454;hpb=dc93f423cc6c9b92289555a329676324665929a9;p=gnome.introspection-doc-generator diff --git a/JSDOC/CompressWhite.js b/JSDOC/CompressWhite.js index 38d3770..d5dca8a 100644 --- a/JSDOC/CompressWhite.js +++ b/JSDOC/CompressWhite.js @@ -8,13 +8,15 @@ @arg packer {Packer} */ -CompressWhite = function (ts, packer, keepWhite) +const CompressWhite = function (ts, packer, keepWhite) { keepWhite = keepWhite || false; ts.rewind(); //var str = File.read(fn); var rep_var = 1; + + while (true) { var tok = ts.next(); if (!tok) { @@ -275,16 +277,20 @@ CompressWhite = function (ts, packer, keepWhite) while (true) { tok = keepWhite ? ts.next() : ts.nextTok(); - if (tok.type == "COMM") { - tok.outDate == ' '; - } + if (!tok) { break; } + if (tok.type == "COMM") { + tok.outData = '\n'; + } + ///print(tok.type + ':' + tok.data); - if (tok.type == "NAME" && tok.identifier && tok.identifier.mungedValue && tok.identifier.mungedValue.length) { + if (tok.type == "NAME" && tok.identifier + && tok.identifier.mungedValue && tok.identifier.mungedValue.length) { //f.write(tok.identifier.mungedValue); + //print("MUNGED: " + tok.identifier.mungedValue); out += tok.identifier.mungedValue; continue; }