JSDOC/CompressWhite.vala
authorAlan Knowles <alan@roojs.com>
Wed, 25 Nov 2015 08:31:03 +0000 (16:31 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 25 Nov 2015 08:31:03 +0000 (16:31 +0800)
JSDOC/CompressWhite.vala

index 79d4fca..e556957 100644 (file)
@@ -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;
                
                }
        }