if (this.braceNesting == expressionBraceNesting &&
bracketNesting == 0 &&
parensNesting == 0) {
- print(scopeIndent + "<< EXIT EXPRESSION");
+ print("<< EXIT EXPRESSION");
this.expN--;
return;
}
break;
case '[': //Token.LB:
- bracketNesting++;
+
+ var ts = this.ts;
+ var _this = this;
+ token.items.forEach(function(ns) {
+ print("EXPR-PUNC[:" + JSON.stringify(ns, null, 4));
+ _this.ts = new TokenStream(ns);
+ _this.ts.cursor--;
+ _this.parseExpression();
+ });
+ this.ts = ts;
+
break;
-
+/*
case ']': //Token.RB:
bracketNesting--;
break;
-
+*/
case '(': //Token.LP:
parensNesting++;
break;
//println("<B>EID</B>");
- case 'KEYW':
+ case 'KEYW':
print("EXPR-KEYW:" + JSON.stringify(token, null, 4));
if (token.name == "FUNCTION") {
}
break;
}
-
+ default:
+ print("EXPR-SKIP:" + JSON.stringify(token, null, 4));
}
if (!this.ts.nextTok()) break;
}
- print(scopeIndent + "<< EXIT EXPRESSION");
+ print("<< EXIT EXPRESSION");
this.expN--;
},