// } else {
expr();
if (token != TokenNameRBRACKET) {
- throwSyntaxError("']' expected after '{$'.");
+ throwSyntaxError("']' expected.");
}
getNextToken();
// }
throwSyntaxError("String or Variable token expected.");
}
getNextToken();
+ if (token == TokenNameLBRACKET) {
+ getNextToken();
+ // if (token == TokenNameRBRACKET) {
+ // getNextToken();
+ // } else {
+ expr();
+ if (token != TokenNameRBRACKET) {
+ throwSyntaxError("']' expected after '${'.");
+ }
+ getNextToken();
+ // }
+ }
}
// if (token != TokenNameRBRACE) {
// throwSyntaxError("'}' expected after '{$'.");