- | LBRACKET type[t,check] { types.push_back(t); }
- ( COMMA type[t,check] { types.push_back(t); } )* RBRACKET
- { if(types.size() == 1) {
- if(types.front().isFunction()) {
- // old style function syntax [ T -> U ]
- PARSER_STATE->parseError("old-style function type syntax not supported anymore; please use the new syntax");
- } else {
- PARSER_STATE->parseError("I'm not sure what you're trying to do here; tuples must have > 1 type");
- }
+ | LBRACKET ( type[t,check] { types.push_back(t); }
+ ( COMMA type[t,check] { types.push_back(t); } )* )? RBRACKET
+ { if(types.size() == 1 && types.front().isFunction()) {
+ // old style function syntax [ T -> U ]
+ PARSER_STATE->parseError("old-style function type syntax not supported anymore; please use the new syntax");