X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FCompressWhite.js;h=50d7476e10984fdd2a4d6bfb8af89db6e7ce894d;hb=dad53f90789b90b0767d049a5c449b305d64941b;hp=c9f328be6c2f3c5a9c87993795d478452adb0682;hpb=50f97b47f7dc0e27a2729d7979a8cf684e8dce64;p=gnome.introspection-doc-generator diff --git a/JSDOC/CompressWhite.js b/JSDOC/CompressWhite.js index c9f328b..50d7476 100644 --- a/JSDOC/CompressWhite.js +++ b/JSDOC/CompressWhite.js @@ -8,7 +8,7 @@ @arg packer {Packer} */ -CompressWhite = function (ts, packer, keepWhite) +const CompressWhite = function (ts, packer, keepWhite) { keepWhite = keepWhite || false; ts.rewind(); @@ -271,13 +271,14 @@ 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) { tok = keepWhite ? ts.next() : ts.nextTok(); - print(JSON.stringify(ts,null,4)); + if (!tok) { break; } @@ -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; }