X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FCompressWhite.js;h=da6e505b641f795bb783df4fab859982bd62c862;hb=7bc383e02b7fe7e7cab2544b62a7cbbe415093f1;hp=ab1b294a15d12230f5cb986b10fe0567b64f8dbb;hpb=7cf9af94d476f601586d71ff17f877d5a1acdc7e;p=gnome.introspection-doc-generator diff --git a/JSDOC/CompressWhite.js b/JSDOC/CompressWhite.js index ab1b294..da6e505 100644 --- a/JSDOC/CompressWhite.js +++ b/JSDOC/CompressWhite.js @@ -71,11 +71,27 @@ 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!!!"; + } + print('FN: '+ts.tokens[cu].toString()); + print('F1: '+ts.lookTok(1).toString()); + print('F2: '+ts.look(1,true).toString()); + // if next is not ';' -> make it so... // although this var a=function(){},v,c; causes - if (ts.lookTok(1).data != ';' && ts.lookTok(1).data != '}' && ts.lookTok(1,true).name == "NEWLINE") { + if (ts.lookTok(1).data != ';' && ts.lookTok(1).data != '}' && ts.look(1,true).name == "NEWLINE") { ts.look(0).outData = ts.look(0).data+";"; } // restore.. @@ -139,8 +155,7 @@ CompressWhite = function (ts, packer) throw "could not find end lbrace!!!"; } // if next is not ';' -> make it so... - print(ts.lookTok(1).toString()); - print(ts.lookTok(1,true).toString()); + if (ts.lookTok(1).data != ';' && ts.lookTok(1).data != '}' && ts.look(1,true).name=="NEWLINE") { ts.look(0).outData = ts.look(0).data +";"; }