X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FCompressWhite.vala;h=ca8aa78be9f3a76055ea8ec2ad8b17f33eb44c2b;hp=0b1839986f59fd615734eb78d153c13f034c0a3a;hb=50d42f7c884d44c43818778d109699a7da679e51;hpb=35ddfbdfc0fb33aab65d6722db3948ca210ede7f diff --git a/JSDOC/CompressWhite.vala b/JSDOC/CompressWhite.vala index 0b18399..ca8aa78 100644 --- a/JSDOC/CompressWhite.vala +++ b/JSDOC/CompressWhite.vala @@ -71,15 +71,19 @@ namespace JSDOC ts.cursor = cu; continue; } - // a = function() { ... + // a = function() { ... -- add a semi colon a tthe end if not one there.. 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 (ts.balance("(").size < 1 ){ + if (tok.data != "(" || ts.balance("(").size < 1 ){ print("balance ( issue on line %d\n", ts.toArray().get(cu).line); ts.dump(cu-40, cu+2);