JSDOC/CompressWhite.js
authorAlan Knowles <alan@roojs.com>
Mon, 23 Sep 2013 04:11:39 +0000 (12:11 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 23 Sep 2013 04:11:39 +0000 (12:11 +0800)
JSDOC/CompressWhite.js

index 80694d3..249afe7 100644 (file)
@@ -274,6 +274,8 @@ const CompressWhite =  function (ts, packer, keepWhite)
     try { out.length = ts.slen; } catch (e) {} // prealloc.
     
     out = '';
+    print("CW: " +out);
+    
     var tok;
     while (true) {
         
@@ -291,7 +293,7 @@ const CompressWhite =  function (ts, packer, keepWhite)
         if (tok.type == "NAME"  && tok.identifier 
             && tok.identifier.mungedValue && tok.identifier.mungedValue.length) {
             //f.write(tok.identifier.mungedValue);
-            //print("MUNGED: " + tok.identifier.mungedValue);
+            print("MUNGED: " + tok.identifier.mungedValue);
             out += tok.identifier.mungedValue;
             continue;
         }
@@ -301,15 +303,18 @@ const CompressWhite =  function (ts, packer, keepWhite)
         if ((tok.type == 'STRN') && (tok.name== 'DOUBLE_QUOTE')) {
             if (packer && packer.stringHandler) {
                 out += packer.stringHandler(tok);
+                print("STR: " +out);
                 continue;
             }
         }
-     
+        
         out += tok.outData !== false ? tok.outData : tok.data;
+        print("TOK: " +out);
         
         if ((tok.outData == ';') && (out.length - outoff > 255)) {
             outoff = out.length;
             out += "\n";
+            print("BR: " +out);
         }
     }
     print("CW: " +out);