From: Alan Knowles Date: Wed, 25 Nov 2015 08:31:03 +0000 (+0800) Subject: JSDOC/CompressWhite.vala X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=0bc9a4379cc6f25995a8eb8cdf7f7655394fa10c JSDOC/CompressWhite.vala --- diff --git a/JSDOC/CompressWhite.vala b/JSDOC/CompressWhite.vala index 79d4fca..e556957 100644 --- a/JSDOC/CompressWhite.vala +++ b/JSDOC/CompressWhite.vala @@ -274,11 +274,11 @@ namespace JSDOC // NOW OUTPUT THE THING. //var f = new File(minfile, File.NEW); - var out = ''; + var outstr = ""; var outoff = 0; //try { out.length = ts.slen; } catch (e) {} // prealloc. - out = ''; + Token tok; while (true) { @@ -293,28 +293,29 @@ namespace JSDOC ///print(tok.type + ':' + tok.data); - if (tok.type == "NAME" && tok.identifier != null - && tok.identifier.mungedValue && tok.identifier.mungedValue.length) { + if (tok.type == "NAME" && + tok.identifier != null && + tok.identifier.mungedValue.length > 0) { //f.write(tok.identifier.mungedValue); //print("MUNGED: " + tok.identifier.mungedValue); - out += tok.identifier.mungedValue; + outstr += tok.identifier.mungedValue; continue; } // at this point we can apply a text translation kit... - - if ((tok.type == "STRN") && (tok.name== "DOUBLE_QUOTE")) { - if (packer && packer.stringHandler) { - out += packer.stringHandler(tok); - continue; - } - } + // NOT SUPPORTED.. + //if ((tok.type == "STRN") && (tok.name== "DOUBLE_QUOTE")) { + // if (packer && packer.stringHandler) { + // outstr += packer.stringHandler(tok); + // continue; + // } + //} - out += tok.outData != "" ? tok.outData : tok.data; + outstr += tok.outData != "" ? tok.outData : tok.data; if ((tok.outData == ";") && (out.length - outoff > 255)) { outoff = out.length; - out += "\n"; + outstr += "\n"; } } //f.close(); @@ -324,7 +325,7 @@ namespace JSDOC return out.substring(0,out.length-1); } */ - return out; + return outstr; } }