X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FCompressWhite.vala;h=4114c9723fc65e4abbe46a22f153aec2d50489d1;hp=ca8aa78be9f3a76055ea8ec2ad8b17f33eb44c2b;hb=954be6f9897a8e3866089bb5f67fbe5409b608b9;hpb=50d42f7c884d44c43818778d109699a7da679e51 diff --git a/JSDOC/CompressWhite.vala b/JSDOC/CompressWhite.vala index ca8aa78..4114c97 100644 --- a/JSDOC/CompressWhite.vala +++ b/JSDOC/CompressWhite.vala @@ -76,15 +76,16 @@ namespace JSDOC if (ts.lookTok(1).data == "=" && ts.lookTok(2).name == "FUNCTION") { // freeze time.. //println("got = function() "); - tok = ts.next(); - tok = ts.next(); - tok = ts.next(); - - var cu = ts.cursor; - ts.cursor+=2; // move two along, and balance... - - if (tok.data != "(" || ts.balance("(").size < 1 ){ + tok = ts.nextTok(); + tok = ts.nextTok(); + //tok = ts.next(); + var cu = ts.cursor; + print("NEXT = should be brac: %s\n", ts.lookTok(1).asString()); + + print("cursor = %d", ts.cursor); + + if (ts.lookTok(1).data != "(" || ts.balance("(").size < 1 ){ print("balance ( issue on line %d\n", ts.toArray().get(cu).line); ts.dump(cu-40, cu+2); print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>"); @@ -92,10 +93,17 @@ namespace JSDOC throw new CompressWhiteError.BRACE( "could not find end lbrace!!!" ); } + print("cursor = %d", ts.cursor); + print("CUR = should be ): %s\n", ts.lookTok(0).asString()); + + tok = ts.nextTok(); + print("CUR = should be {: %s\n", ts.lookTok(0).asString()); + cu = ts.cursor; // set the cursor to here.. so the next bit of the code will check inside the method. + print("cursor = %d", ts.cursor); //print("AFTER BALANCE ("); //ts.dump(cu, ts.cursor); //ts.cursor--; // cursor at the ( - if (ts.balance("{").size < 1 ){ + if (tok.data != "{" || ts.balance("{").size < 1 ){ ts.dump(cu-40, cu); print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");