- iface->block_name = expect_identifier();
- iface->members = new Block;
- parse_block(*iface->members, true, &Parser::parse_variable_declaration_with_layout);
+ var->interface = tokenizer.parse_token();
+ if(!is_interface_qualifier(var->interface))
+ throw parse_error(tokenizer.get_location(), var->interface, "an interface qualifier");
+
+ strct->block_name = expect_identifier();
+ string name_base = format("_%s_%s", var->interface, strct->block_name);
+ strct->name = name_base;
+ for(unsigned i=1; (stage_types.count(strct->name) || global_types.count(strct->name)); ++i)
+ strct->name = format("%s_%d", name_base, i);
+ var->type = strct->name;
+ parse_block(strct->members, true, &Parser::parse_variable_declaration_with_layout);