X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FCompressWhite.js;h=50d7476e10984fdd2a4d6bfb8af89db6e7ce894d;hp=6e5a74bd8d9baf8f3e4b1159a077c2c63aae19bf;hb=32210f938b140061c5af2ab70d6b0c009b723653;hpb=d1fca5e50f35deeb5cef86fbf3716d0a4e960d2b diff --git a/JSDOC/CompressWhite.js b/JSDOC/CompressWhite.js index 6e5a74b..50d7476 100644 --- a/JSDOC/CompressWhite.js +++ b/JSDOC/CompressWhite.js @@ -8,13 +8,13 @@ @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; - print(JSON.stringify(ts,null,4)); + while (true) { @@ -271,7 +271,8 @@ CompressWhite = function (ts, packer, keepWhite) var out = ''; var outoff = 0; - out.length = ts.slen; // prealloc. + try { out.length = ts.slen; } catch (e) {} // prealloc. + out = ''; var tok; while (true) { @@ -285,9 +286,12 @@ CompressWhite = function (ts, packer, keepWhite) tok.outData = '\n'; } + ///print(tok.type + ':' + tok.data); + 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; }