()
| 235 | }; |
| 236 | |
| 237 | var union_type = function() { |
| 238 | all_ws(); |
| 239 | if (!consume(OTHER, "(")) return; |
| 240 | var ret = { sequence: false, generic: null, nullable: false, array: false, union: true, idlType: [] }; |
| 241 | var fst = type_with_extended_attributes() || error("Union type with no content"); |
| 242 | ret.idlType.push(fst); |
| 243 | while (true) { |
| 244 | all_ws(); |
| 245 | if (!consume(ID, "or")) break; |
| 246 | var typ = type_with_extended_attributes() || error("No type after 'or' in union type"); |
| 247 | ret.idlType.push(typ); |
| 248 | } |
| 249 | if (!consume(OTHER, ")")) error("Unterminated union type"); |
| 250 | type_suffix(ret); |
| 251 | return ret; |
| 252 | }; |
| 253 | |
| 254 | var type = function() { |
| 255 | return single_type() || union_type(); |
no test coverage detected