case "ELSE": // if next item is not a semi; (or }
- if (!ts.lookTok(1).name == "IF") {
+ if (ts.lookTok(1).name != "IF") {
continue;
}
-
+ // add a space if next element is 'IF'
tok.outData = tok.data + " ";
continue;
case "++": // if previous was a plus or next is a + add a space..
case "--": // if previous was a - or next is a - add a space..
- var p = (tok.data == "--" ? '-' : '+');
+ var p = (tok.data == "--" ? "-" : "+");
if (ts.lookTok(1).data == p) {
tok.outData = tok.data + " ";
continue;
case "TYPEOF": // what about typeof(
- if (ts.lookTok(1).data != '(') {
+ if (ts.lookTok(1).data != "(") {
tok.outData = tok.data + " ";
}
continue;
//try { out.length = ts.slen; } catch (e) {} // prealloc.
out = '';
- var tok;
+ Token tok;
while (true) {
tok = keepWhite ? ts.next() : ts.nextTok();
- if (!tok) {
+ if (tok == null) {
break;
}
if (tok.type == "COMM") {