JSDOC/CompressWhite.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 14 Jul 2010 08:14:18 +0000 (16:14 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 14 Jul 2010 08:14:18 +0000 (16:14 +0800)
JSDOC/CompressWhite.js

index b8715d8..de1b149 100644 (file)
@@ -71,8 +71,21 @@ CompressWhite =  function (ts, packer)
                 //println("got = function() ");
                 var cu = ts.cursor;
                 
-                ts.balance("(");
-                ts.balance("{");
+                 if (!ts.balance("(") ){
+                    ts.dump(cu-40, cu);
+                    print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
+                    ts.dump(cu, cu+40);
+                    
+                    throw "could not find end lbrace!!!";
+                }
+                 if (!ts.balance("{") ){
+                    ts.dump(cu-40, cu);
+                    print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
+                    ts.dump(cu, cu+40);
+                    
+                    throw "could not find end lbrace!!!";
+                }
+                
                 
                 // if next is not ';' -> make it so...
                 // although this var a=function(){},v,c; causes