JSDOC/TokenStream.js
[gnome.introspection-doc-generator] / JSDOC / CompressWhite.js
index 1698649..5c7ffec 100644 (file)
@@ -8,9 +8,9 @@
    @arg packer {Packer} 
  */
  
-CompressWhite =  function (ts, packer)
+CompressWhite =  function (ts, packer, keepWhite)
 {
-    
+    keepWhite = keepWhite || false;
     ts.rewind();
     //var str = File.read(fn);
     var rep_var = 1;
@@ -21,6 +21,9 @@ CompressWhite =  function (ts, packer)
             break;
         }
         if (tok.type == "WHIT") {
+            if (keepWhite) {
+                ts.look(0).outData = ts.look(0).data;
+               }
             continue;
             //if (tok._isDoc) {
             //    continue;
@@ -79,7 +82,7 @@ CompressWhite =  function (ts, packer)
                     throw "could not find end lbrace!!!";
                 }
                 //print("AFTER BALANCE (");
-                ts.dump(cu, ts.cursor);
+                //ts.dump(cu, ts.cursor);
                 //ts.cursor--; // cursor at the (
                 if (!ts.balance("{") ){
                     ts.dump(cu-40, cu);