if (ts.lookTok(1).data == "=" && ts.lookTok(2).name == "FUNCTION") {
// freeze time..
//println("got = function() ");
- tok = ts.next();
- tok = ts.next();
+ tok = ts.nextTok();
+ tok = ts.nextTok();
+
//tok = ts.next();
-
- var cu = ts.cursor;
+ var cu = ts.cursor;
+ print("NEXT = should be brac: %s\n", ts.lookTok(1).asString());
+
+
if (ts.lookTok(1).data != "(" || ts.balance("(").size < 1 ){
- print("CUR: %s\n", ts.lookTok(0).asString();
- print("NEXT = should be brace: %s\n", ts.lookTok(1).asString();
print("balance ( issue on line %d\n", ts.toArray().get(cu).line);
ts.dump(cu-40, cu+2);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
throw new CompressWhiteError.BRACE( "could not find end lbrace!!!" );
}
- tok = ts.lookTok(0);
-
+ 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("AFTER BALANCE (");