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);